Home About News Products Blog

Image quality issues with mod PageSpeed

pagespeed
image
imagequality

#1

User asked:

We run image optimisation through section.io and are seeing issues with images on our site. There are differences between the image from our web application and the image through the CDN. The original image is sharp but through the CDN it becomes blurry.

There are a number of reason that mod PageSpeed image optimisations could cause this.
Here are the common issues.

  1. Image Compression.
    Mod Pagespeed will compress an image if it thinks the original is too large in bytes. You can toggle the level of compression using pagespeed ImageRecompressionQuality 95; in the server config. See https://www.modpagespeed.com/doc/reference-image-optimize#ImageRecompressionQuality

  2. Image resize.
    Mod Pagespeed will resize an image if the original is larger than the displayed size. If the original is 1000x1000 pixels, but is marked with HTML attributes height="400" width="400" then Pagespeed will resize that image according to the HTML attributes. Check the HTML to make sure that the width and height attributes are correctly set.
    You can also toggle whether Pagespeed should resize an image if it is close to the original size to preserve clarity using pagespeed ImageLimitResizeAreaPercent 45; See https://www.modpagespeed.com/doc/reference-image-optimize#ImageLimitResizeAreaPercent for details

  3. Specific image compression settings
    Mod Pagespeed allows you to set image compression for specific file types. e.g. https://www.modpagespeed.com/doc/reference-image-optimize#JpegRecompressionQuality
    Make sure these settings are correct.