Add toggle to manage whether native img
is used instead of amp-img
and add admin pointer
#7035
Labels
Changelogged
Whether the issue/PR has been added to release notes.
Enhancement
New feature or improvement of an existing one
Milestone
Feature Description
With #6805 we're now defaulting to native
img
instead ofamp-img
. However, this could have unintended side effects (e.g #7029 (comment)) sinceamp-img
has been around from the beginning and there may be CSS selectors written that specifically targetamp-img
. Previously the CSS sanitizer would convertimg
selector toamp-img
(andamp-anim
) while converting the elements in the DOM. But when using native image, no such conversion is done. So if someone was expecting to style an image withamp-img
this would no longer match.Therefore, in order to mitigate this major change it is warranted to add a new toggle to the Settings screen in the Advanced section for whether native
img
is enabled. True this can be managed via a PHP filter as well, but this would require a user to add a mini plugin which is greater friction than just a simple toggle. The toggle should be omitted or disabled if a site has anyamp_native_img_used
filter.Upon upgrading to 2.3, there should be an admin pointer that alerts users to the fact that native images are now being used, with a deep link to that toggle in the Settings screen. The toggle description should advise users to check their site for issues with images rendering, and if so, to try turning off native images to see if that resolves the issue.
Acceptance Criteria
No response
Implementation Brief
No response
QA Testing Instructions
No response
Demo
No response
Changelog Entry
No response
The text was updated successfully, but these errors were encountered: