Skip to main content
← Back to the blog
Optimization•

JPG, PNG, WebP, AVIF, GIF or SVG? Choosing the Right Image Format

Five questions decide the right image format for almost any job. This guide walks through them and explains what each format is good and bad at.

JPG, PNG, WebP, AVIF, GIF or SVG? Choosing the Right Image Format

Choosing a format is mostly about what is in the image and where it is going. The same picture can be 40 KB as a WebP and 900 KB as a PNG with no visible difference, or look blotchy as a JPG and crisp as a PNG. Answer these questions in order and the choice usually makes itself.

Question 1: Is it a logo, icon or illustration made of shapes?

If the original was drawn in a design program (a logo, icon, diagram or simple illustration), use SVG when the destination accepts it. SVG stores shapes rather than pixels, so it is sharp at any size and usually tiny. Websites accept SVG; most upload forms and social networks do not, and for those you export a PNG at the size you need. Our PNG vs SVG guide goes into the details.

Related tool: JPG to WebP

Convert JPG photos to WebP in your browser, one or many at a time.

Open JPG to WebP →

Question 2: Does it need transparency?

JPG cannot store transparency at all. If parts of the image must be see-through (a cut-out product, a logo for a coloured background, a signature), use PNG for maximum compatibility, or WebP or AVIF for a much smaller file where they are supported. Converting a transparent image to JPG fills the transparent area with a solid colour.

Question 3: Is it a photograph or a screenshot?

This is the question people most often get wrong.

  • Photographs (smooth gradients, natural textures) compress very well with lossy formats: JPG, WebP and AVIF. A PNG of a photo is typically several times larger with no visible benefit.
  • Screenshots, text, charts and flat-colour graphics have hard edges and large areas of one colour. Lossy formats blur the edges and add faint smudges around text. PNG keeps them crisp and is often smaller than you would expect, because flat areas compress well losslessly.

Question 4: Is it going on a website you control?

For your own website, modern formats save real bandwidth:

  • WebP is supported by every current major browser. Lossy WebP photos are commonly 25 to 35 percent smaller than JPGs of similar quality, and it supports transparency and animation.
  • AVIF is often smaller again, especially for photos, and is supported by current versions of Chrome, Edge, Firefox and Safari. Encoding is slower, and very old browsers cannot show it.

Many sites serve AVIF or WebP with a JPG fallback. Whatever the format, sizing images to the dimensions they are actually displayed at usually saves more than the format choice; our guide to images and Core Web Vitals explains how.

Question 5: Is it going somewhere you do not control?

Email attachments, upload forms, print shops, marketplaces and social networks: when in doubt, use JPG for photos and PNG for graphics. They are accepted almost everywhere. Some platforms still reject WebP uploads, and many forms only list JPG. HEIC, the iPhone default, is the format most likely to be refused.

What about GIF?

GIF is limited to 256 colours per frame, so photos look grainy and banded. Its one remaining strength is that animated GIFs play everywhere, including in email. For animation on a website, animated WebP or a short muted video is usually far smaller. For still images there is no reason to use GIF; convert it with GIF to JPG or to PNG.

Quick reference

FormatBest forTransparencyAvoid for
JPGPhotos for anywhereNoText, screenshots, logos
PNGScreenshots, graphics, transparencyYesLarge photos
WebPPhotos and graphics on your websiteYesUploads to strict forms
AVIFSmallest photos on modern websitesYesOlder browsers, forms
GIFSimple animations in emailOne colour onlyPhotos, stills
SVGLogos, icons, diagrams on the webYesPhotos, most upload forms

Converting without losing more than you have to

  • Convert from the best original you have. Every lossy save throws away a little detail, so converting a JPG that was already compressed into WebP will not recover anything.
  • Converting a lossy format to PNG does not improve quality; it only makes the file bigger.
  • Keep originals. Export web copies from them rather than repeatedly converting the same file.

Image York's converters, such as JPG to WebP, PNG to JPG and JPG to AVIF, run in your browser. Use the Image Size Checker to confirm a file's real format and size before and after.

Frequently Asked Questions

Is PNG better quality than JPG?

PNG is lossless, so it never adds compression artifacts, which matters for text and graphics. For photos a high-quality JPG looks the same and is far smaller.

Should I convert all my images to WebP?

For images on your own website, usually yes. For files you send to other people, forms or print shops, JPG and PNG are still the safest choice.

Is AVIF better than WebP?

AVIF is often smaller for photos at similar quality, and current major browsers support it. It is slower to encode, and very old browsers cannot display it.

Why did my transparent PNG get a black background?

It was converted to a format without transparency, such as JPG. Keep it as PNG or WebP, or place it on the background colour you want before converting.
I

Article Written By

Image York Team