Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Responsive images missing ‘size’ attribute in AMP

$
0
0

Replies: 0

On testing my website on GTMetrix it highlighted that the correct srcset images were not being served (https://gtmetrix.com/reports/volleyverse.com/VIkJMmS2). This had been the case previously and no relevant coding has since taken place.

Looking at the amp-img code it appears that:

On AMP validating pages the ‘sizes’ code that tells the browser what size image to use at each screen resolution isn’t present.
Example page – https://volleyverse.com/news/indoor/2019-asian-womens-volleyball-championship-match-schedule/

Looking at a page that uses the same template but has AMP switched off via the WP post console the ‘sizes’ attribute is present – sizes=”(max-width: 728px) 100vw, 728px”.
Example page – https://volleyverse.com/live/2019-womens-cev-eurovolley-how-to-watch-live-stream-online/

Is this a planned feature and AMP is now handling responsive images differently or a bug?

Thanks


Viewing all articles
Browse latest Browse all 59525

Trending Articles