Image size question

17 views
Skip to first unread message

Carl Whalley

unread,
Apr 5, 2016, 5:54:08 AM4/5/16
to mod-pagespeed-discuss
On a pagespeed-managed page, suppose I have an image 600x600 pixels and it takes 1M space, but it's specified in the <img> tag as 72x72 pixels, so the user just gets a thumbnail. Will the 1M be sent over?

Jan-Willem Maessen

unread,
Apr 5, 2016, 8:25:30 AM4/5/16
to mod-pagesp...@googlegroups.com
On Tue, Apr 5, 2016 at 5:54 AM, Carl Whalley <carl.w...@gmail.com> wrote:
On a pagespeed-managed page, suppose I have an image 600x600 pixels and it takes 1M space, but it's specified in the <img> tag as 72x72 pixels, so the user just gets a thumbnail. Will the 1M be sent over?

Yes, pagespeed can resize images – just use the resize_images filter:


Note that mod_pagespeed can't resize images in place (without changing the url), as we can never tell if a page on your site might someday need the full-sized image.

-Jan
 

--
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/9c1c389b-a874-4a5f-a4d1-25634b4da0db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Huibao Lin

unread,
Apr 5, 2016, 8:42:32 AM4/5/16
to mod-pagesp...@googlegroups.com
In addition to the resize_images filter which Jan suggested, you can also use the responsive_images and responsive_images_zoom filters. Those filters resize image based on the dimension which you specified in the IMG tag, and the pixel density ratio or zoom level of your visitor's device, so your visitor will have better visual experience. See 

Huibao

Reply all
Reply to author
Forward
0 new messages