Short answer: For most client websites I use WebP for photos, SVG for logos and icons, and PNG only when a graphic needs sharp edges or transparency and WebP will not do. JPEG stays as a fallback and for email, and I add AVIF for large hero images when the site serves a lot of photos.
Images are usually the heaviest thing on a small business website. When a site feels slow, the first thing I open is the network tab, and nine times out of ten there is a 4 MB phone photo sitting in the header or a logo saved as a huge PNG. Picking the right format is not the whole fix, but it is the cheapest one. Here is how I decide which format goes where on the sites I build.
The formats I actually use
There are many image formats, but only a handful matter for websites today. These are the ones I work with every week.
WebP for most photos
WebP is my default for photos: team pictures, product shots, project galleries and blog covers. At the same visual quality it is usually a good deal smaller than a JPEG, often around a quarter to a third smaller in my own tests. Every current browser supports it, including Safari on iPhones, so I no longer need to plan around browsers that cannot show it.
I export most photos at a quality of around 75 to 82. Below that, faces and skin tones start to look smeared. Above that, the file grows without any difference you can see on a normal screen.
AVIF for big, photo-heavy pages
AVIF compresses even better than WebP, especially on large images with smooth gradients like skies or studio backgrounds. The trade-off is that it is slower to encode, and some editing tools and older content systems still handle it badly. I use it for full-width hero images and big galleries, served through a <picture> element with a WebP fallback. For a five-page site with a dozen photos, the extra saving is often too small to be worth the extra step.
JPEG as the safe fallback
JPEG still works everywhere, which is why I keep it for email newsletters, files that clients download, and images that get shared to other platforms. Some social networks and email apps still behave oddly with WebP. On the website itself, though, I rarely serve plain JPEG anymore.
PNG for screenshots and sharp graphics
PNG is lossless, so it keeps text and hard edges crisp. That makes it right for screenshots of software, diagrams and graphics with flat colour. It is the wrong choice for photos: a photo saved as PNG can easily be five to ten times larger than the same photo as WebP. Lossless WebP can often replace PNG too, and I test both and keep whichever is smaller.
SVG for logos and icons
SVG is not a grid of pixels. It is a small file of drawing instructions, so it stays sharp at any size, on any screen, and usually weighs only a few kilobytes. Logos, icons and simple illustrations should be SVG whenever the original artwork allows it. I always ask clients for the vector logo file (AI, EPS, PDF or SVG) at the start of a project for this reason.
One caution: an SVG file can contain scripts. I never let site visitors upload SVG files, and I clean any SVG I receive before putting it on a site.
GIF: almost never
Animated GIFs are huge for what they show. If a page needs a short animation or a screen recording, a muted, looping MP4 or WebM video is usually a fraction of the size and looks better.
How I choose a format for each image
When I am preparing images for a new site, I go through them with a few simple questions:
- Is it a photo? WebP, and AVIF as well if it is large and important.
- Is it a logo, icon or simple shape? SVG if I have the vector file.
- Is it a screenshot or has text in it? PNG or lossless WebP, whichever is smaller.
- Does it need a transparent background? WebP or PNG. JPEG cannot do transparency.
- Is it moving? A short video file, not a GIF.
Format is only half the job
A WebP file can still be far too big if it is the wrong size. Most of the heavy images I find are the right format but are 4000 pixels wide and shown in a box 600 pixels wide.
Resize before you upload
I resize photos to roughly the largest size they will appear on screen, then double it for sharp phone screens. For a full-width hero that usually means about 1600 to 2000 pixels wide. For a card or thumbnail, 600 to 800 pixels is plenty.
Serve different sizes to different screens
With srcset and sizes, the browser picks a smaller file on a phone and a larger one on a desktop monitor. On the custom PHP sites I build, I usually set up the admin panel to create these sizes automatically when the client uploads a photo, so they do not have to think about it.
Set width and height, and lazy load the rest
I always put width and height on image tags so the page does not jump around while images load. Images further down the page get loading="lazy". The main image at the top does not, because lazy loading it makes the page look slower, not faster.
Remove the extra data
Photos from phones and cameras carry metadata such as the camera model and sometimes the GPS location where the photo was taken. I strip this on export. It saves a few kilobytes, and more importantly it stops a business owner from accidentally publishing their home location.
Tools I use to convert images
You do not need expensive software for any of this:
- Squoosh in the browser, for converting and comparing a few images by eye.
- Photoshop or Figma export settings, when I am already working on the design.
- The command line (cwebp, avifenc or ImageMagick) for converting a whole folder at once.
- Server-side resizing in the site's own upload code, so new images are handled without anyone remembering to do it.
After converting, I compare the old and new versions side by side at full size. If I cannot see a difference, I keep the smaller file.
What this does for a real site
On a typical small business homepage with a hero photo, a few service images and a logo, switching to the setup above often takes the page from several megabytes down to well under one. That helps visitors on mobile data, and it helps your Core Web Vitals, especially Largest Contentful Paint, which is often the hero image itself. It will not fix a slow server or heavy scripts on its own, but it is usually the quickest improvement on the list.
If you are planning a new site and want a rough idea of the budget, including the time for preparing images properly, my website cost calculator gives you a starting range.
Common questions
Should I convert every image on my site to WebP?
For photos, yes, in most cases. Keep your logo as SVG, and keep the original high-resolution files somewhere safe in case you need to export them again later.
Does WordPress handle this for me?
Recent versions of WordPress accept WebP and AVIF uploads and create several sizes automatically. They do not convert your JPEGs or resize a huge upload down to a sensible maximum on their own, so it still pays to prepare images before uploading, or to use a well-maintained image plugin.
Does image format affect SEO?
Not directly. Google can index WebP, AVIF, PNG, JPEG and SVG. What matters is page speed, a descriptive file name and useful alt text that describes what is in the image.
If your site feels heavy and you are not sure whether images are the cause, send me the link and I will tell you which images are slowing it down.
If you want help with this on your own site, send me a message here or see what I've built.
Back to Blogs