-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
Needs DevAnything that requires development (e.g. a pull request)Anything that requires development (e.g. a pull request)[Plugin] Modern Image FormatsIssues for the Modern Image Formats plugin (formerly WebP Uploads)Issues for the Modern Image Formats plugin (formerly WebP Uploads)[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing featureno milestonePRs that do not have a defined milestone for releasePRs that do not have a defined milestone for release
Description
Feature Description
Switch from using the_content
filter to using wp_calculate_image_srcset
when replacing images.
As @joemcgill points out in #1236 (review) we should probably switch the image processing approach. Currently the webp_uploads_update_image_references
function is attached to the_content
filter and processes all images on the page using a regex. Instead, we can leverage the filters core runs on images after it does a similar regex against the content. Namely, the wp_calculate_image_srcset
or wp_content_img_tag
filters are potential places to add our logic.
westonruter
Metadata
Metadata
Assignees
Labels
Needs DevAnything that requires development (e.g. a pull request)Anything that requires development (e.g. a pull request)[Plugin] Modern Image FormatsIssues for the Modern Image Formats plugin (formerly WebP Uploads)Issues for the Modern Image Formats plugin (formerly WebP Uploads)[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing featureno milestonePRs that do not have a defined milestone for releasePRs that do not have a defined milestone for release
Type
Projects
Status
Done 😃