Lessons

Minification of images without loss of quality

Images in JPEG, PNG, GIF, SVG format have the potential to optimize the size without losing quality. This is due to the fact that graphic editors and cameras do not care about reducing the size of files. They also add background information (metadata) that increases the file size.

Use the following programs to optimize images:

  • jpegoptim with the parameters jpegoptim --strip-all --all-progressive [file path] for JPEG.
  • [pngquant](https://pngquant.org /) with the parameters pngquant --force 256 [file path] and [optipng](https://sourceforge.net/projects/optipng /) with the parameters optipng -i0 -o2 --strip all [file path] for PNG. To achieve maximum results, use both programs in this sequence.
  • gifsicle with the parameters gifsicle -b -O5 [file path] for GIF.
  • svgo for SVG.

Using these programs, you can set up automatic optimization of all images of your site once a day.

There are also free online services for image optimization. [Visual service for fine SVG optimization](https://jakearchibald .github.io/svgomg/).

Check your website
It's free and will take from 11 to 45 seconds

We use cookies. By continuing to use the site, you agree to the processing of personal data in accordance with privacy policy. I agree