DEV 6.4 Use the correct image format for the job

Different formats are suited to different types of image - the type you use affects the image quality and file size.

  • Choose the correct format for the job:
    • Use JPEGs for photographs;
    • Use GIFs for line art, cartoons, blocks of colour, etc;
    • SVG/PNG - are getting better supported by browsers but use with caution.
  • Optimise the image:
    • Balance file size and quality using design/ image processing software;
    • Scale to the exact dimensions used on the page:
      • and specify the dimensions in the img element.
  • Do not use ascii art

Tip: Many image packages allow you to reduce the file size without any noticeable effect on quality.

a photo montage - these should be JPEG A flag - block colours like these, line art etc. should be GIF 
Poor: Don't use ascii art