Not using image_downsize() in wp_prepare_attachment_for_js() can break esoteric usage
|Reported by:||nacin||Owned by:||ryan|
If you disable all intermediate image sizes (so no images are created on upload), and then create them on the fly using the image_downsize filter (say, with a URL that can dynamically create images on the fly), our clever use of image metadata in wp_prepare_attachment_for_js() doesn't work.
We need to use image_downsize(). Preliminary patch attached.
If it is too slow for tons of prepares (and I imagine it may be), we may be able to fire the filter only, as long as the size exists in the metadata array for cases where the filter is not used.