Image optimization

A website can lose most of its points in Google PageSpeed Insights simply by having unoptimized images on it.

The extension's functionality allows to automatically optimize product images. However, in order to optimize other images you will need to manually run the included shell-script and specify the folders that require optimization.

NB! In order to optimize images the extension requires installed Jpegoptim and OptiPNG utilities.
If you're not sure how to do it yourself, please seek advice from a qualified employee.

Optimization Recommendations

It is recommended to use:

  • Image format – PNG or JPG/JPEG
  • Default image optimization parameters – this way you're sure to optimize the images correctly without the loss of quality

Optimization Process

To optimize images on a page:

  1. Make sure that the extension settings (System -> Configuration -> Page Speed Optimizer) have an image backup path specified
  2. Image 1. Backup path
  3. Check the required page on Google PageSpeed Insights. Images that require optimization will have their paths specified
  4. Image 2. Unoptimized images
  5. Browse to the 'shell' directory from your site's root folder:
    cd ./shell
  6. Launch the script with specifying the full path to the optimized folder (in our case, the first one is media/wysiwyg):
    php optimize_images.php -path media/wysiwyg
  7. Repeat this step for all required directories
  8. In about a minute check the results on Google PageSpeed
  9. Image 3. Optimized images

Last modify date: Monday, May 15, 2017