Performance · Images · 2026 edition

The Complete Guide to Image Optimization for 2026

Everything you need to know about formats, quality settings, Core Web Vitals, and how to configure images for WordPress, Shopify and Webflow — with real numbers, not vague advice.

Sourced, not invented. Every format saving on this page is quoted from Google's own WebP study or from the HTTP Archive. Every Core Web Vitals threshold comes from web.dev. Where we could not source a figure, we did not print one.

  • 10 sections
  • 12 min read
  • 4 platform guides
  • 5 primary sources

1 What "image optimization" actually means

Image optimization is the process of reducing an image's file size while keeping it visually acceptable for its purpose. That last part matters — "acceptable for its purpose" is different for a hero banner on a homepage than for a thumbnail in an email inbox.

An image that looks fine at 400 KB on a blog might be unacceptable at that size for a print catalogue. An image that looks fine at 60 KB in a thumbnail might be unusable at 60 KB in a full-screen portfolio view. There is no single "optimized" image — there is only the right image for the right context.

So optimization is not a single action. It is three separate levers you can pull in combination: resizing, compressing, and converting. Most people pull only one, which is why their images are still too heavy. Pulling all three — in the right order — is where the real savings come from.

Want to try it right now?

Our free tool resizes, compresses and converts in one pass — entirely in your browser. No uploads, no signups.

Open the tool

2 Lever one: resizing

Resizing changes the physical pixel dimensions of an image. A 4032 × 3024 photo from a modern iPhone has about 12 million pixels. If you are placing it in a card that renders at 800 × 600 on screen, the browser has to download 12 million pixels and then throw away most of them. That is wasted bandwidth on every single visit.

The rule for resizing web images is simple: match the largest size the image will ever display at, then double it for high-density screens. If a product image renders at 400 pixels wide in your grid, exporting it at 800 pixels wide covers both standard and Retina displays. There is no reason to export at 4000 pixels for a slot that only ever shows 400.

Resizing is the single highest-impact lever because it reduces the actual amount of information the browser has to download. Everything else is fine-tuning.

3 Lever two: compressing

Compressing keeps the pixel dimensions the same but reduces the file size by simplifying the data inside the image. There are two types, and understanding the difference changes how you think about the quality slider.

  • Lossy compression throws away some data permanently in exchange for a smaller file. JPG and lossy WebP are both lossy. A JPG saved at quality 80 is visually indistinguishable from one saved at quality 100 on most screens, but is often 60–70% smaller.
  • Lossless compression reduces file size without losing any data at all. PNG and lossless WebP are lossless. Lossless files are larger than lossy files for the same image, but they preserve every pixel exactly. This matters for graphics, logos, and images with sharp text edges.

For photographs, quality 80 is a good default. For screenshots of text, raise it to 90 or higher — text is where lossy compression shows first. For thumbnails and blog images, 70 is fine.

4 Lever three: converting

Converting changes the file format itself. In 2026 there are four formats worth knowing:

  • JPG — oldest, most compatible, no transparency. Still fine for photographs when you need the widest possible support.
  • PNG — lossless, supports transparency, larger file sizes. Good for logos, icons, and images with hard edges or text.
  • WebP — modern, supports both lossy and lossless, supports transparency. Google's own WebP study found lossy WebP is 25–34% smaller than JPEG at equivalent quality, and lossless WebP is around 26% smaller than PNG. This is the format you should default to for web images in 2026.
  • AVIF — newer format, often smaller than WebP in many cases. Browser support is good but not universal, so it is usually used as an additional option alongside WebP rather than a replacement.

If you are unsure what to pick, WebP is the safe default for photographs and graphics with transparency. JPG is the safe fallback for maximum compatibility. PNG is still correct for logos and text-heavy images where exact pixel preservation matters more than file size.

5 Why order matters

The order you apply these three levers makes a real difference. The correct order is:

  1. Resize first. Removing pixels reduces the amount of data that every subsequent step has to process. If you compress a 12-megapixel image and then resize it down to 800 pixels, you wasted effort — and the compression artifacts get baked into the resized result.
  2. Convert next. Pick the right format for the use case (WebP for web, JPG for compatibility, PNG for transparency).
  3. Compress last. Apply quality reduction at the target format and size. This is the fine-tuning step.

Our free image tool applies all three in one pass, which is why it produces better results than running the same image through three separate tools.

6 Core Web Vitals and why they matter

Google's Core Web Vitals use three metrics to judge how a page feels to a real visitor:

  • Largest Contentful Paint (LCP) — how long the largest visible element takes to appear. Per web.dev, an image is the LCP element on the majority of pages. Target: under 2.5 seconds.
  • Interaction to Next Paint (INP) — how quickly the page responds to user interaction. Image weight indirectly affects this because heavy pages are slower to become interactive.
  • Cumulative Layout Shift (CLS) — how much the layout jumps around as elements load. Images without explicit width and height attributes are a common cause of CLS.

Optimizing images is the most direct way to improve LCP, because LCP is usually an image. Compressing and resizing your images is one of the highest-leverage SEO tasks you can do, and it is why we built our tool.

Check your image sizes in seconds

Drop any photo into our tool and see exactly how many KB you can save without any visible quality loss.

Try the free tool

7 How images affect AI search in 2026

AI search engines and assistants — including Google's AI Overviews, ChatGPT, and Perplexity — read and summarize web pages. They also look at images and their metadata. A page with clean image formats, descriptive alt text, and appropriate file sizes is easier for these systems to process and cite accurately.

This does not mean you should optimize specifically for AI. It means the same things that make a page fast and well-structured for human visitors also make it easier for AI tools to summarize correctly. Image optimization is a core part of that.

Two things matter most for AI citation:

  • Alt text — a short, descriptive sentence that explains what the image shows. AI systems use this to understand the image's role on the page.
  • Structured data — schema markup that tells AI systems what type of content the page contains and who wrote it.

8 When you don't need to optimize

Optimization is not always the right move. There are legitimate cases where you want to keep the original file untouched:

  • Print or archival — keep the original untouched. Do not optimize files meant for high-resolution printing or long-term storage.
  • Source files for future editing — keep the highest-quality original you have. Optimization is destructive for lossy compression.
  • Legal or medical records — do not re-compress images that need to preserve every pixel exactly.
  • Professional photography deliverables — deliver full-resolution files unless the client specifically asked for web-optimized copies.
The rule: optimize for the destination, keep originals for the source.

9 Common image optimization mistakes

These are the issues we see most often when people send us images that "still look too heavy" after optimization. Most of them take less than five minutes to fix.

Exporting at full camera resolution

A 12-megapixel photo is 4000+ pixels wide. Almost no website displays images wider than 1600 pixels. Resize before you upload — the browser does not need the extra pixels.

Using PNG for photographs

PNG is lossless, which means it stores every pixel exactly. Great for logos, terrible for photos. A photograph saved as PNG can be 5–10 times larger than the same photo saved as JPG or WebP.

Compressing an already-compressed file

Every time you save a JPG as a JPG at lower quality, you lose a bit more detail. If you need to re-edit an image, always go back to the original, not the last compressed version.

Forgetting to set width and height

Even a perfectly optimized image can cause layout shift if the browser does not know its dimensions before it loads. Always set explicit width and height attributes on your <img> tags.

Serving the same image to mobile and desktop

A hero image designed for a 1920-pixel desktop is a waste on a 400-pixel phone. Use the <picture> element or srcset to serve different sizes to different screens.

Optimizing only on upload

Images that were optimized two years ago are often not optimized for today's devices. A quick audit every six months catches files that crept in at full resolution.

Ignoring alt text

Alt text is not just for accessibility. Search engines and AI assistants use it to understand image content. A descriptive alt attribute improves both SEO and screen-reader usability.

Using quality 100 "to be safe"

Quality 100 on JPG or WebP can more than double the file size compared with quality 85, with no visible difference on a normal monitor.

10 Platform-specific settings

Different platforms have different defaults for image handling. Here is what works best on the four most common ones.

WordPress

WordPress generates multiple thumbnail sizes automatically, which is why a single upload can add five or six files to your media library. To get the most out of your images before uploading:

  • Resize your image to about 1600 pixels on the longest edge before uploading. WordPress will generate its own thumbnails from that source.
  • Convert to WebP if your host and plugins support it. Many modern hosts serve WebP automatically, and plugins like Imagify or ShortPixel generate both WebP and a JPG fallback.
  • Set quality to 80–85. The default WordPress JPEG quality is 82, which is already a reasonable target.
  • Disable unnecessary thumbnail sizes in functions.php so WordPress does not generate dozens of unused variants.
  • For ongoing optimization: Smush, Imagify, or ShortPixel handle this well.

Shopify

Shopify serves images through its own CDN and automatically generates responsive variants. The important thing is to upload at the correct size and format:

  • Upload product images at 2048 × 2048 or larger if the product page uses zoom. For collections, 1000 × 1000 is plenty.
  • Shopify supports WebP and serves it automatically to modern browsers when you upload JPG or PNG. You do not need to pre-convert.
  • Use quality 85 for product photos because zoom functionality needs detail.
  • Avoid PNG for product photography — lossless is not worth the extra bandwidth for photos.
  • Set alt text on every product image; Shopify uses it for SEO and accessibility.

Webflow

Webflow serves images from its own CDN and does not automatically convert them to WebP, so pre-conversion matters here:

  • Convert to WebP before uploading — Webflow serves it as-is and you get the size savings.
  • Resize to the largest dimension the image displays at. Webflow uses srcset automatically for responsive images.
  • Quality 80 works well for most Webflow projects.
  • For hero images, keep the width at 1920 or lower.
  • Set explicit dimensions in the Webflow UI to avoid layout shift.

Custom / Static Sites (HTML, Astro, Next.js)

On custom sites you have full control over the image pipeline. The best practice in 2026:

  • Convert everything to WebP at build time. Astro, Next.js, and Vite all have image plugins that do this automatically.
  • Generate three sizes per image: 400, 800, and 1600 pixels wide. Serve the smallest one that fits the viewport.
  • Use the <picture> element with a WebP source and a JPG fallback.
  • Always set width, height, and loading="lazy" on non-critical images.
  • Preload the LCP image with <link rel="preload"> and do not lazy-load it.

Ready to optimize your images?

Our free tool resizes, compresses and converts JPG, PNG, WebP and HEIC files in one pass. Everything runs in your browser — nothing leaves your device.

Open the free tool Platform presets

Sources

These are the primary references this guide is built on.

  1. Google Developers — A New Image Format for the Web (WebP study)
  2. web.dev — Core Web Vitals
  3. web.dev — Largest Contentful Paint (LCP)
  4. web.dev — Optimize images
  5. Google Search Central — Image SEO best practices
  6. HTTP Archive — Web Almanac

Khalil Rahman

Founder, SkillsInsider

Web developer and SEO practitioner, certified through DigiSkills.pk (Government of Pakistan digital skills program) in SEO and digital marketing. Khalil writes about image optimization, Core Web Vitals, and building fast, private browser tools at SkillsInsider, a small studio in Khanpur, Pakistan.