resize_rendered_image_dimensions and media queries

65 views
Skip to first unread message

Frank P

unread,
Mar 26, 2014, 7:32:09 PM3/26/14
to mod-pagesp...@googlegroups.com
Hi,
resize_rendered_image_dimensions works well with simple dimensions definition in css for example (inline width/height or with a specific class)
But what about media queries support ? From my tests it seems mod_pagespeed retains the dimensions of the first page display.
For example if the first load of my page matchs a media query defining my width image to 600px, even if I switch of media query case by reloading the page in a smaller window it keeps delivering the 600px width.
Is it a known issue and is there a current work on it ?
Thanks

Jud Porter

unread,
Mar 27, 2014, 1:42:42 PM3/27/14
to mod-pagesp...@googlegroups.com
HI Frank,

The rendered_image_dimensions filter is a bit simplistic in that it will use the size of the most recent client sample that it's taken. So in your case, it won't do a great job if many clients are rendering the image at different sizes. As an enhancement, we should be aggregating multiple samples for rendered image dimensions, and then conservatively resize to the largest image size that the image can be displayed as. I've filed a feature request for this at https://code.google.com/p/modpagespeed/issues/detail?id=919


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/5b5e22fd-8feb-4b3d-b328-15f0a0ef384a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages