Best File Format For Web Images

Sangwin Gawande
3 min readJul 22, 2022

--

1. Google’s WebP (Lightweight with Great Quality)

  • This open format has been developed by Google & released in April, 2018.
  • It makes image files smaller than PNGs & are faster to load.
  • WebP lossless images are 26% smaller in size compared to PNGs.
  • WebP lossy images are 25–34% smaller than comparable JPEG images at equivalent quality.
  • Lossless WebP supports transparency at a cost of just 22% additional bytes.
  • WebP also supports transparency, typically providing much smaller file sizes compared to PNG.
  • Make files smaller at the same quality level, reduce page speed loading times & get more organic traffic to your website.
  • Many Big companies has already switched to WebP — Facebook reports 80% data savings compared with use of PNG files
  • WebP is natively supported in Google Chrome, Safari, Firefox, Edge, the Opera browser, & by many other tools & software libraries.
  • Developers have also added support to a variety of image editing tools.

2. Vector SVG (Immune to resolution)

  • It is well known SVGs are vector files & are immune to resolutions, means they can be expanded or shrunk down to any size without loss of quality.
  • Image size & display type don’t matter with SVGs — they always look the same.
  • Unlike other file formats on this list SVG is a vector file & your image can be resized without losing quality.
  • This may be very useful for a logo images, website users can enlarge your logo to full screen & see crisp & clean lines.
  • SVGs can be used as one image for both larger or smaller devices like old phone or large retina display, without compromising quality.
  • SVG files can be easily edited as they have XML code.
  • SVGs can be best used for icons, logos & QR codes etc.

3. PNG (Heavyweight with Great Quality)

  • Portable Network Graphics (PNG) was released in 1997.
  • It was a standard file format for web images for many years.
  • PNG files does not loose the quality after image compression.
  • PNG format supports a large number of colors & is suitable for different types of digital images, including photographs & graphics.
  • Image transparency is one of the great reasons PNGs are widely used.
  • PNG images are widely used for larger images such as banners, transparent images

4. JPEG (Great for Photography, Not for logos)

  • JPEG (jpg) format was designed for lossy compression of images like digital photography.
  • It is not suitable for logos with lines, curves & text & sharp contrasts can cause noticeable artefacts
  • JPEG is the most common image format used by digital cameras & other photographic image capture devices.
  • The JPEG compression algorithm operates at its best on photographs & paintings of realistic scenes with smooth variations of tone & color.
  • JPEG is not well suited for line drawings & other textual or iconic graphics, where the sharp contrasts between adjacent pixels can cause noticeable artefacts.

Conclusion :

It must be clear to you after reading above points that WebP and SVG are clear winners but PNG and JPEG has their own advantages.

I personally use WebP for banners, sliders, photos and SVGs for icons, logos and QR codes.

Also read How Do I Optimise Images For My Websites so that you can load your website faster.

Hope it helps!!

Cheers!!

--

--