You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search engines that index AMP pages that have <amp-img> will likely not know what the web component is, at a semantic level. Unless they have special logic to recognize what an amp-img is, they would have to fire up a headless browser to actually render the page with JavaScript in order to find out what the web component constructs in the DOM. Beyond search engines, users who have JavaScript disabled are also adversely affected by amp-img because it does not render given the lack of the AMP runtime.
So instead of replacing an img with an amp-img, we should be constructing an amp-img and then inserting the original img as a descendant of an added noscript element.
Related #1316: Add support for <picture> element, which also involves fallbacks.
The text was updated successfully, but these errors were encountered:
Search engines that index AMP pages that have
<amp-img>
will likely not know what the web component is, at a semantic level. Unless they have special logic to recognize what anamp-img
is, they would have to fire up a headless browser to actually render the page with JavaScript in order to find out what the web component constructs in the DOM. Beyond search engines, users who have JavaScript disabled are also adversely affected byamp-img
because it does not render given the lack of the AMP runtime.However, as can be seen at https://ampbyexample.com/components/amp-img/ the
amp-img
element allows a regularimg
as fallback content if it inside of anoscript
element:So instead of replacing an
img
with anamp-img
, we should be constructing anamp-img
and then inserting the originalimg
as a descendant of an addednoscript
element.Related #1316: Add support for
<picture>
element, which also involves fallbacks.The text was updated successfully, but these errors were encountered: