Force compression for the images with Pagespeed module

61 views
Skip to first unread message

Abhishek

unread,
Jun 2, 2021, 11:57:37 PM6/2/21
to mod-pagespeed-discuss
Hello,

I am testing Page Speed module on basic Apache 2.4 installation

Not all images are getting compressed/optimized here http://3.91.72.64/ I am specifically looking to optimize 25 MB image on the page. 

Is there a way to force compression?

Am I missing something?

Thank you in advance for looking into this.

-Abhishek

Longinos

unread,
Jun 3, 2021, 3:25:02 AM6/3/21
to mod-pagespeed-discuss
Hi
Whit the debug filter enabled ( http://3.91.72.64/?PageSpeedFilters=+debug) the MAUIheader.jpeg image get this message:

<!--Uncacheable content, preventing rewriting of http://3.91.72.64/images/MAUIheader.jpeg-->

Disabling pagespeed module ( http://3.91.72.64/?PageSpeed=off) these file don´t have a cache-control header.

Pagespeed need that files have a public cacheable header to work.
The other images have a very short time (like cache-control: max-age=169) so pagespeed need to reoptimize the image everi 169 seconds.

Abhishek Mohite

unread,
Jun 3, 2021, 11:42:27 AM6/3/21
to mod-pagesp...@googlegroups.com
Thank you so much for your reply

I added cache-control header in httpd.conf file as below
<FilesMatch "\.(ico|jpg|jpeg|png|gif|svg|woff|js|css)$">
        Header set Cache-Control "max-age=604800, public"
</FilesMatch>

Following filters are enabled for the PageSpeed module. Since one of the images was 25 MB, I had to increase value for the property ModPagespeedMaxCacheableContentLength and the PageSpeed module seems to be processing this file. Is there a way to compress this huge image to a smaller size and send it to the browser. I also used height and width attributes for the <img> tag here http://3.91.72.64/ and was expecting it to render a smaller image in terms of dimensions and file size but does not seem to be working.

ModPagespeedEnableFilters extend_cache
ModPagespeedEnableFilters inline_images
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters recompress_images
ModPagespeedEnableFilters responsive_images,resize_images
ModPagespeedMaxCacheableContentLength 66777216

Thank you for your help.

--
You received this message because you are subscribed to a topic in the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mod-pagespeed-discuss/w3fmyFcRHEI/unsubscribe.
To unsubscribe from this group and all its topics, 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/87c831c3-5f2c-49e9-836c-01f8f3908c24n%40googlegroups.com.


--
Regards,
Abhishek


Longinos

unread,
Jun 4, 2021, 6:28:11 AM6/4/21
to mod-pagespeed-discuss
Hi
Maybe you can try to use some of these filters:
strip_image_color_profile
strip_image_meta_data
To make the file more flat
And some of those others
resize_images
or
resize_rendered_image_dimensions
https://www.modpagespeed.com/doc/reference-image-optimize#resize_images
Reply all
Reply to author
Forward
0 new messages