Which image format is best (GIF, PNG or JPG) ?

Which image format is best (GIF, PNG or JPG) ?


Can you share your preferences on image formats for public web sites?

I'm currently designing a Content Management System application and the challenge is to choose one of the following: GIF, PNG or JPG.
Screen loading is a major performance concern especially for heavy content pages this application will need to support.

Hi Pedro,

Performance-wise PNG8 is usually considered the best bet and you can use services like smush it to optimize those images.
Another very important aspect is to set the caching headers (if you are serving the images dynamically you can do this with the HTTPRequestHandler extension ) and specify image dimensions in HTML. 
Check also recommended performance best practices at Yahoo and Google.

Tiago Simões
Thanks, Tiago!

I especially found interesting Google's mentioning about the use of JPG format.
When I converted some of the site's to PNG24 or PNG32 I wasn't very satisfied with the result (still bigger than JPG).

So, I guess some best practices would be:
   - use JPG for photographic-style ones;
   - use PNG8 for smaller ones (buttons, simple backgrounds);