Hi @xylo04,
Thanks for getting in contact with us, my name is Fellyph and I will help you today. I have looked at your website, the loading property is valid for HTML, but AMP uses a different tag for images: https://amp.dev/documentation/components/amp-img
There is a plugin for flicker gallery, injecting invalid AMP content, if you want to keep using this plugin you can disable AMP for this particular page or use the Gutenberg gallery block, that is compatible with AMP.
I can verify that the offending attribute loading=”eager” is in the AMP HTML
Could you clarify this? You’re seeing loading=eager in the AMP spec? Only loading=lazy is currently allowed for normal AMP documents (ref).
There is also loading=eager which is allowed on Optimized AMP pages which are transformed from normal AMP pages to add server-side rendering (ref).
In general, when wanting to ensure an image is loaded eagerly it is best to omit the loading attribute altogether, as in Chromium-based browsers that allows them to follow the auto behavior that respects the user being in “data saver” mode, to lazy-load images by default when on slow connections.
Thread Starter
xylo04
(@xylo04)
Fellyph, Weston, thanks for the responses. I suspect Fellyph is correct here, the Flickr Gallery plugin isn’t rendering correct AMP-safe HTML. We’re not doing anything explicit to use the loading attribute, and I don’t see any configuration in the Flickr plugin that would adjust what it’s outputting. We’ll probably just disable AMP for that page.
-
This reply was modified 4 years, 5 months ago by
xylo04.
Hi @xylo04,
You can disable AMP only for one page at the post settings:
About the Flickr plugin, we will investigate if we can find a solution to turn around this issue.
As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.