What is the best image format for a web page and for a desktop application? I like png format. Is it good for both?

5 Answers 5


Well it depends what the image shows.

For photos JPG is a good choice. While it's a lossy data compression, it can create quite compress photo-like picture with a very good loss/compression ratio. So you get a high compression without loosing to much information. Of course it depends on the quality factor.

For more abstract pictures like graphics, clip-arts, UI-elements PNG is a better choice. It's a loss-less compression, with is very good at compressing more 'abstract' pictures without losing any information.

  • 1
    The problem with jpg is that there are patents on its format.
    – txwikinger
    Commented Aug 12, 2010 at 20:56
  • 2
    Yes, but like every major operating system, major browser etc supports it. And theres no real alternative with a equally good support and results for photos.
    – Gamlor
    Commented Aug 12, 2010 at 22:19

It think PNG is good enough to work with. but there are some problems in rendering PNG files on different platforms. It is better to use JPEG if you don't need transparency. but if you need transparency, PNG is the best choice.


png is great but the files can be larger than jpg for photos so you may want to use jpgs for those.

Just remember for webapps that ie6 doesn't support png transparency.


Agreed with accepted answer, but it's worth noting that PNG may be a bad choice for web since IE6 does not support PNG out of the box. There may have been an update, but this doesn't change much -- for example, my uncle (a VP at a software company...) refuses to install updates. Yeah, IE6 ruins everything fun.

GIF, despite its age, has better support, and is also smaller, so is a good choice for anything that will fit in 256 colors.

  • Anybody who uses IE6 should not be surfing the Internet. IE6 is not save!
    – txwikinger
    Commented Aug 12, 2010 at 20:56
  • I've lost a lot of good men in the browser wars... But IE6 is still used more than twice as much as Safari: w3schools.com/browsers/browsers_stats.asp Commented Aug 12, 2010 at 21:34

You didn't give any indication of what type of pictures these are - photographs? drawings? The best format is not universal.

For a webpage, vector graphics will look great regardless of how zoomed in your user is, or what their screen resolution is. SVG is a pretty widely used vector graphics format. I don't know how well it's supported across web-browsers though.

  • NEVER use SVG -- The most widely-used browser (i.e., IE) doesn't support it (IE9 does). PNG is a bit iffy, too since IE6 doesn't support it out of box. Commented Aug 11, 2010 at 23:22
  • 2
    There are JavaScript workarounds for IE's lack of SVG support, likewise for IE6's PNG transparency problems. Better to patch poor behavior than use it to limit your best-possible experience Commented Aug 12, 2010 at 0:25
  • But if your browser workaround involves serving up an image in a different format, why not just serve that image up in the first place and save the headache? Commented Aug 12, 2010 at 21:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.