How to lower the size (in bytes) of an image?

December 2016

If you find that your JPEG files are too heavy ( sending a mail or to publishing image files a web page), here's how to optimize their size :

Step 1 (optional): Skip GREYCstoration on the image

GREYCstoration can optimize your image files by removing the minor variations in pixel intensities.

Step 2: Lower the resolution

For example, if you take a photo with a 5 Mega-pixel digital camera, the dimensions of the image will be 2592 x 1944 pixels, which is far too big for a web page.
  • Lower the resolution, eg 640x480 or 800x600. This is sufficient for a clear and precise image.
  • Some softwares: XnView and Gimp

.**XnView can perform batch conversation.

Step 3: Lower the quality

You can choose the quality of JPEG files, (between 1% and 100%):
  • 1% is the lowest quality, but also gives smaller files.
  • In most cases, 40% is sufficient.

Step 4: Remove unnecessary information

  • JPEG files can contain many things besides the image itself: a miniature of the image, the parameters of the software use to create the file, the camera settings (focus, exposure ...) .
  • It is possible to delete such information with a program like PureJPEG (free):
  • Run the following command: purejpeg myimage.jpg


  • Try to find the right balance between resolution, image quality and file size in order to avoid major degradation of the image.

Thanks to sebsauvage for this tip.

Related :

This document entitled « How to lower the size (in bytes) of an image? » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.