Skip to content
Brahmweb
Web Development

How to Optimize Images for Your Website: Sizes, Formats, and a 5-Minute Workflow

Slow website? Images are usually the reason. Learn the right image sizes, when to use WebP, AVIF, JPG, PNG, or SVG, how much to compress, and a quick workflow using free in-browser tools.

Zlpa4 min read
Contents
  1. Why image size matters
  2. Recommended image sizes
  3. Which format to use
  4. How much to compress
  5. A 5-minute workflow for every image
  6. Don't forget the HTML
  7. Platform tips
  8. Quick checklist
  9. How Brahmweb helps
  10. Frequently asked questions

When a website feels slow, images are the most common reason. A single photo straight from a phone can be 4–8 MB — more than the rest of the page combined. Fix your images and you often fix your speed problem, your mobile experience, and part of your SEO in one go.

Here's what sizes and formats to use, and a fast workflow you can follow for every image.

Why image size matters

  • Speed: heavy images delay the main content, especially on mobile data.
  • SEO: Google's Core Web Vitals measure how fast your largest element loads — usually a hero image.
  • Conversions: visitors leave slow pages. For online stores, every extra second costs sales.
  • Hosting costs: smaller files mean less bandwidth.
ImageMax widthTarget file size
Full-width hero / banner1920pxunder 200 KB
Blog or content image1200pxunder 100 KB
Product image1000–2000px (for zoom)under 150 KB
Thumbnail / card400–600pxunder 40 KB
Open Graph (social share)1200 × 630pxunder 300 KB
Favicon32 × 32 to 512 × 512pxa few KB

Uploading a 4000px photo and letting the browser shrink it is the most common mistake: the visitor still downloads the full file.

Which format to use

FormatUse it forAvoid for
WebPAlmost everything: photos, graphics, transparency—
AVIFPhotos where you want the smallest possible fileWhen you need fast encoding or older-browser support
JPGPhotos when WebP isn't an optionLogos, text, transparency
PNGScreenshots and graphics that must be pixel-perfectPhotos (files get huge)
SVGLogos, icons, simple illustrationsPhotos

If you only remember one rule: photos in WebP, logos in SVG.

How much to compress

For lossy formats (WebP, AVIF, JPG), a quality setting of 75–85 is the sweet spot for most photos. Below 70 you'll start to see blur and blocky edges; above 90 the file grows a lot for little visible gain. Always compare before and after at normal size, not zoomed in.

A 5-minute workflow for every image

You can do all of this with our free image tools. They run entirely in your browser, so your images are never uploaded to a server.

  1. Crop to the shape you need — 16:9 for banners, 1:1 or 4:5 for products and social. → Crop image
  2. Resize to the max width from the table above. → Resize image
  3. Convert to WebP (or AVIF). → Convert format
  4. Compress to quality 75–85, or set a target size in KB. → Compress image
  5. Rename the file descriptively before uploading: blue-linen-shirt-front.webp, not IMG_4821.webp.

Got a whole folder of product photos? Resize, convert, and compress all support batch processing.

Don't forget the HTML

Optimized files are half the job. The other half is how the page loads them:

  • Add alt text that describes the image — for accessibility and Google Images.
  • Set width and height so the page doesn't jump around while images load.
  • Lazy-load images below the fold with loading="lazy" — but not your hero image, which should load first.
  • Serve responsive sizes with srcset, so phones download smaller files than desktops. Frameworks like Next.js and platforms like Shopify do this for you.
  • Use a CDN so images are served from a location near each visitor.

Platform tips

  • WordPress: compress before uploading, and use a plugin or CDN that serves WebP. Remove unused image sizes your theme generates.
  • Shopify: Shopify serves resized WebP automatically, but uploading huge originals still slows the admin and some themes. Keep product images around 2000px.
  • Next.js: the built-in Image component handles resizing, modern formats, and lazy-loading — but it can't fix a source image that's poorly cropped.

Quick checklist

  • No image wider than it's ever displayed
  • Photos in WebP or AVIF, logos in SVG
  • Hero under 200 KB, content images under 100 KB
  • Descriptive file names and alt text
  • Width and height set; below-the-fold images lazy-loaded

How Brahmweb helps

If your site is still slow after fixing images, the cause is usually deeper: heavy themes, too many plugins or apps, render-blocking scripts, or slow hosting. We audit and fix website performance on WordPress, Shopify, and custom stacks.

Explore our web development services, or get a free speed review →

Frequently asked questions

What is the best image format for a website?

WebP is the best all-round choice in 2026 — roughly 25–35% smaller than JPG at similar quality and supported by every modern browser. AVIF is smaller still. Use SVG for logos and icons, and PNG only when you need lossless transparency WebP can't handle.

How big should images be on a website?

Aim for under 200 KB for large hero images and under 100 KB for content images. Most hero images don't need to be wider than 1920px, and blog images rarely need more than 1200px.

Does image compression reduce quality?

Lossy compression removes detail, but at quality settings around 75–85 the difference is very hard to see while the file is often 60–80% smaller. Always compare before and after at normal viewing size.

Do images affect SEO?

Yes. Large images slow down pages, which hurts Core Web Vitals such as Largest Contentful Paint. Descriptive file names and alt text also help images appear in Google Images and make pages accessible.

Modernizing your stack? Get a free assessment

We'll review your current system and send an honest plan: what to migrate, what to keep, timeline, and cost.