page speed insights doesn't do srcset / sizes (no more)

81 views
Skip to first unread message

hglr

unread,
Jan 24, 2017, 7:46:49 AM1/24/17
to pagespeed-insights-discuss
hello all, 

as far as i searched the group i couldn't find anything on the topic yet ... 

since 2-3 weeks google page speed insights seems to choke on srcset & sizes, in that it completely ignores both and only loads the file referenced in the src attribute.

test case: 
  • page with a 50% image container
  • an image with 5 srcset references
  • and 1 sizes attribute (50vw)
  • and a different src attribute to show the failure

<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <title>Page Speed Insights Test - srcset / sizes</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
</head>

<style>div{width:50%;margin: 0 auto}img{max-width:100%}</style>

<body>
  <div>
    <img srcset="img-ok-400.png 400w, img-ok-600.png 600w, img-ok-800.png 800w, img-ok-1200.png 1200w, img-ok-1600.png 1600w"
         sizes="50vw"
  </div>
</body>

</html>


local chrome selects the right image from srcset and everything works as expected



but page speed insights always loads the file referenced in the src attribute, seemingly ignoring srcset & sizes completely:


can anyone confirm this?


Rick Steinwand

unread,
Jan 24, 2017, 8:34:26 AM1/24/17
to pagespeed-insights-discuss
I can confirm the <picture> element works.

Enrica Ruedin

unread,
Mar 22, 2018, 7:36:42 AM3/22/18
to pagespeed-insights-discuss
<pictures> isn't an option for me, because contao as cms generates different picture sizes automatically and it uses "srcset" and "sizes". 

Page speed doesn't take the "src" defined image. It chooses any image sometimes with 1500w for mobile! So i get 43% ranking.

Does somebody know when Page speed works as chrome does?


Am Dienstag, 24. Januar 2017 14:34:26 UTC+1 schrieb Rick Steinwand:
Reply all
Reply to author
Forward
0 new messages