lscache_wp icon indicating copy to clipboard operation
lscache_wp copied to clipboard

Gather Images Outside Metadata

Open benplum opened this issue 3 years ago • 0 comments

We use a plugin that generates additional crops sizes for images that are stored outside of the metadata and added via the wp_get_attachment_metadata hook. I see that the Img_Optm _gather_images function makes a direct database query and skips over using internal WP function calls, so the callbacks are never applied.

Are there any hooks or methods for optimizing image crops that are not explicitly stored in the attachment's metadata? Ideally I'd like a way to pass these extra image sizes for webp generation, as well as the source string replacement on the front end. Otherwise we're unable to benefit from the webp functionality without reworking all client sites.

benplum avatar Jun 16 '21 15:06 benplum