Skip to content
ToolsCampus

Image guide

How to Compress Images for Your Website (and Load Faster)

Compress images for your website so pages load faster: the right pixel sizes, WebP vs JPG, target file sizes and a WordPress checklist.

How to Compress Images for Your Website (and Load Faster)

To compress images for your website, resize each picture to about twice the width it is shown at, then save photos as WebP or JPG at a moderate quality and graphics as PNG or WebP with fewer colours. The files often shrink to a fraction of their size, and pages load faster on every connection.

This guide covers the right pixel sizes, sensible file size targets, a five-minute workflow, what WordPress does with your uploads, and the image SEO basics that go with it.

Compress your website images now: free, no sign-up, and your pictures stay on your device.

Why image size matters for your website

Pictures are often the heaviest part of a web page. Large ones slow down the moment your page looks ready, use up visitors’ mobile data, and make people leave before they see your content.

Google measures loading with Core Web Vitals. One of them, Largest Contentful Paint (LCP), is the time until the biggest thing on the screen appears, and for a good score it should happen within 2.5 seconds, as Google’s web.dev guide to LCP explains.

On many pages that biggest thing is a header or hero picture, so a lighter hero image is one of the quickest ways to improve the score. Google’s PageSpeed Insights also points out pictures that are larger than needed or saved in older formats.

Recommended image sizes for websites

These are rules of thumb, not hard limits. Check how wide each picture is actually shown by your theme.

Where the image is used Width in pixels Aim for a file size under
Full-width hero or banner 1920 to 2560 about 300 to 500 KB
Picture inside a blog post or page 1200 to 1600 about 200 KB
Product photo 1000 to 2000 (square is common) about 150 to 250 KB
Thumbnail or card 400 to 800 about 60 KB
Logo or icon As shown, times two about 20 KB (or use SVG)

A photo straight from a phone is often 4000 pixels wide or more. Shown 1200 pixels wide, it carries about eleven times the pixels the page needs, which no quality setting can make up for. If you work from your phone, shrinking photos on iPhone and Android shows the same steps in a mobile browser.

How to compress images for your website (step by step)

  1. Find the display width. Your theme’s documentation usually lists it. Or right-click a picture on your site, choose Inspect, and hover over the image to see its shown size.
  2. Resize big photos. For pictures much larger than needed, resize them in your photo app first: Tools > Adjust Size in Preview on a Mac, or Resize in Paint on Windows. For hero images, the shrink option in the next step is enough.
  3. Compress. Open Compress image, add up to 50 pictures, keep Recommended, and under Save as choose WebP (small, keeps transparency). Tick Also shrink very large photos to cap the longest side at 2,560 pixels. Click Compress images.
  4. Check the results. The list shows each size before and after. Open one or two next to the originals and look closely at faces, skies and text.
  5. Rename the files. Downloads are named like IMG_2041 (compressed).webp. Rename them to short, descriptive names with hyphens, such as blue-running-shoes.webp, before uploading.
  6. Upload and add alt text that describes what the picture shows.

Not sure whether WebP, JPG or PNG suits a picture? See JPG vs PNG vs WebP. For logos and screenshots, how to reduce PNG file size explains the colour settings.

What WordPress does with your images

WordPress helps, but it doesn’t replace compressing before you upload:

  • It makes smaller copies of each upload (thumbnail, medium, large) and lets the browser pick the right one for the screen.
  • It scales down very large uploads. By default, pictures over 2,560 pixels are reduced to 2,560 pixels, and that copy is used as the full size.
  • It re-saves its smaller copies at a quality of 82 by default, but the full-size picture is still the one you uploaded. That is the one used for wide layouts and hero areas.
  • It accepts WebP since WordPress 5.8, and it adds lazy loading to images automatically.

So a heavy picture you upload stays heavy wherever the full size is shown. Compressing first means every copy starts small.

Image SEO checklist

  • Descriptive file names with hyphens, not IMG_2041.jpg.
  • Alt text that says what the picture shows, for people using screen readers and for search engines. Write it for people, not as a list of keywords.
  • Width and height set on each image, so the page doesn’t jump while pictures load. WordPress does this for images added in the editor.
  • Don’t lazy-load the hero picture. The first picture on screen should load straight away. Lazy loading is for pictures further down.
  • Real text, not text in pictures. Search engines and screen readers handle normal text far better.

AI images and alt text

Many sites now use pictures from AI image generators such as ChatGPT, Gemini or Midjourney for blog headers and product mockups. These usually arrive as large PNG files. Save them as WebP with Compress image before uploading, and keep the PNG as your master copy for later edits.

AI assistants such as ChatGPT, Claude, Gemini and Copilot can also suggest alt text when you show them a picture. That is a useful starting point, but read every suggestion: AI sometimes describes things that aren’t in the picture or adds keywords that don’t belong. Good alt text is short, accurate and written for a person who can’t see the image. Check the AI service’s privacy settings before uploading pictures of people or unpublished products.

Common problems

My images look blurry on phones and laptops

Sharp screens need about twice the display width in pixels. A picture shown 600 pixels wide should be around 1200 pixels wide. Use the Light level if fine detail matters.

PageSpeed Insights still says my images are too big

The picture may be shown much smaller than its real size, for example a 2560-pixel photo in a 400-pixel card. Resize it closer to the shown size, or check your theme’s image size settings.

My site won’t accept WebP files

Older WordPress versions, some site builders and some plugins only accept JPG and PNG. Update WordPress, or compress with Save as: JPG instead.

A transparent logo got a white background

JPG has no transparency. Keep logos as PNG or save them as WebP.

Frequently asked questions

What is the best image size for a website?

Match the widest size the picture is shown at, times two for sharp screens: about 1920 to 2560 pixels for full-width banners and 1200 to 1600 pixels for pictures inside a post.

Should I use WebP or JPG on my website?

WebP, if your site accepts it. It is supported by all current browsers and is usually smaller than JPG at the same visible quality. JPG is the fallback when WebP isn’t accepted.

What file size should website images be?

As a rule of thumb, under about 200 KB for pictures inside a page and under about 500 KB for a full-width hero. Smaller is better, as long as the picture still looks sharp.

Does compressing images help SEO?

Indirectly, yes. Smaller images make pages load faster, which improves Core Web Vitals and keeps visitors on the page. Descriptive file names and alt text help search engines understand the pictures.

Publishing a PDF brochure page as a picture? Turn it into an image with PDF to JPG (converting PDF pages to JPG explains the settings), then compress it here. For the basics of keeping quality while compressing, see how to compress an image without losing quality.

Make your website images lighter now. Free, private, and up to 50 pictures at a time.

Follow ToolsCampus Get new free tools first

About the author

Omer Qureshi

Omer Qureshi built and runs ToolsCampus. He writes every guide and tests each step on the live tools before it is published, and updates the guides when the tools change.

Comments

No comments yet. Ask a question or share a tip that helped you.

Leave a comment

Comments appear after review. Your email is only used if we need to reply to you.