WordPressImage OptimizationUpdated for 2026

WordPress Images Not Optimized

IN
Reviewed by the Instant Nerds Team|Last updated: June 2026
Quick summary

Images are usually the heaviest part of a web page, so they are the biggest single speed lever, and there are four of them: format, compression, dimensions, and delivery. WordPress helps with some of this on its own. It generates responsive sizes and adds srcset, scales giant uploads down to 2560 pixels, and supports the modern WebP and AVIF formats. But it does not convert your existing JPEGs and PNGs into those formats, and that conversion is usually the largest win. This page covers the four levers, what WordPress does and does not do for you, and how to clear the PageSpeed image warnings without changing how anything looks.

Key facts at a glance

WordPress image optimization in 2026

Last updated

Why images matter most
Images are usually the largest part of total page weight, so optimizing them is the biggest single speed win. The four levers are format, compression, dimensions, and delivery.
The win WordPress leaves to you
WordPress supports WebP since 5.8 and AVIF since 6.5, but it does not convert your existing JPEGs and PNGs into them. The biggest format win needs a plugin or a filter.
How much smaller
WebP is about 25 to 34 percent smaller than JPEG, and AVIF can be up to 50 percent smaller, both at the same visual quality. Serve AVIF, then WebP, then JPEG as a fallback.
What WordPress does do
Since 4.4 it generates responsive sizes and adds srcset, and since 5.3 it scales any upload over 2560px down. Helpful, but not full optimization on its own.
Size is not appearance
A photo can look identical at a tenth of the file size. Optimization changes the weight a visitor downloads, not how the image looks on the page.
The three PageSpeed audits
Serve images in next-gen formats is the format lever, Properly size images is the dimensions lever, and Efficiently encode images is the compression lever. Each is separate savings.

Source: the WordPress core notes on AVIF in 6.5, big image handling in 5.3, and responsive images in 4.4, the web.dev image performance and format guidance, and our hands-on image optimization work. Get a quote in 60 seconds →

Why images are the biggest speed lever

On most websites, images are the single heaviest thing the browser has to download, often more than all the code, fonts, and other assets combined. That makes them the highest-leverage place to speed a site up. Shave a few megabytes off the images on a page and you have done more for its load time than almost any other change, and you have done it without touching the design, the content, or the functionality. This is why image optimization is the first thing a good performance pass looks at: it is where the biggest, safest wins are.

The reason images are so often unoptimized is that the way they arrive on a site fights against it. A photo from a phone or a stock library is saved for quality and print, with far more data than a web page needs, and it is dropped into WordPress at full size. It looks fine, so nothing seems wrong, and the weight is invisible until you measure it. But every megabyte has to cross the network to each visitor, and on a phone on mobile data that is slow, so heavy images quietly drag down the experience and the Core Web Vitals score even when the page looks perfect.

The good news is that optimizing images is mechanical and reliable. It comes down to four levers, format, compression, dimensions, and delivery, and a properly optimized image is one that has had all four applied. WordPress handles some of these for you and leaves the most important one, format conversion, in your hands. The next section is exactly what WordPress does and does not do, because knowing the line is what tells you where your work begins.

What WordPress does and does not do for your images

WordPress has a real image pipeline that has grown over the years, and it does more than most people realize. Knowing the four things it does, and the one big thing it does not, saves you from both reinventing what is already handled and assuming a problem is solved when it is not.

Since 4.4: responsive sizes and srcset

WordPress generates several smaller copies of every upload and adds the srcset and sizes markup, so the browser can choose a copy that fits the slot instead of always using the full image.

Since 5.3: scaling giant uploads

Any image with a side longer than 2560 pixels is scaled down to 2560 on upload, and that scaled copy is used across the site. The threshold is adjustable with the big_image_size_threshold filter.

Since 5.8 and 6.5: WebP and AVIF support

WordPress can handle WebP since 5.8 and AVIF since 6.5, so you can upload and serve them, and they still get srcset, fetchpriority, and lazy loading. AVIF needs a host with Imagick or LibGD built with AVIF support.

Always: a default compression quality

When WordPress generates the smaller sizes it compresses them to a default JPEG quality of 82, which you can lower for smaller files with the wp_editor_set_quality filter.

The one big thing WordPress does not do

WordPress does not automatically convert your existing JPEG and PNG uploads into WebP or AVIF. It supports those formats, but supporting and converting are different. Out of the box, your JPEGs stay JPEGs, so the largest, easiest win, the next-gen format conversion, is the piece you have to add, with an image optimization plugin or the image_editor_output_format filter. This is the gap that leaves so many WordPress sites failing the next-gen formats audit despite WordPress having full format support.

The four image levers

A fully optimized image has had all four of these applied, and each maps to a specific PageSpeed audit. Missing any one leaves savings behind, which is why a page can still be flagged after you fixed only the obvious one.

LeverPageSpeed auditWhat to do
FormatServe images in next-gen formatsConvert JPEG and PNG to WebP and AVIF. The biggest win, and WordPress will not do it for you.
CompressionEfficiently encode imagesLower the quality data per pixel. WordPress default is 82, tunable with a filter.
DimensionsProperly size imagesDo not serve a large image into a small slot. Use responsive srcset and cap originals.
DeliveryDefer offscreen imagesLazy-load below the fold, never the LCP image. An image CDN can resize at the edge.

One delivery note that belongs to the front end rather than the image file: the image at the top of the page, the LCP element, must never be lazy-loaded, because that delays the largest paint. Lazy loading is for images below the fold. The LCP image discovery question is covered in detail on the mobile speed fix, so this page stays on the image craft itself.

Which symptom matches yours

Find the row that matches what you see, usually a PageSpeed warning. Each one points to a specific lever and fix.

SymptomMost likely root cause
PageSpeed says "Serve images in next-gen formats"Your images are JPEG or PNG. Convert them to WebP and AVIF, which WordPress supports but will not do for you, and serve the original as a fallback.
PageSpeed says "Properly size images"You are serving images larger than they display. Rely on responsive srcset sizes and cap oversized originals so the browser downloads only what it shows.
PageSpeed says "Efficiently encode images"Compression is too light for the file size. Lower the quality to a sensible level and re-generate the sizes.
Huge multi-megabyte originals from a phone or cameraWordPress scales anything over 2560px down on upload, but 2560px is still large for most slots and the format is unconverted. Resize, compress, and convert.
Images look fine on desktop but the page is heavy on mobilePhones are not being sent small responsive sizes, or the format is heavy. The front-end mobile angle is on the mobile speed page.
A page builder or slider serves full-size imagesIt bypasses the WordPress responsive srcset markup, so the browser gets the full image. Configure the builder to size correctly, or optimize at the source.

The six causes of heavy images

Unoptimized images on WordPress almost always come down to these six, often more than one at once.

1. Still in JPEG or PNG, not a modern format

The biggest and most common cause, because WordPress does not convert for you. Images sit in JPEG or PNG when WebP would be a quarter to a third smaller and AVIF up to half. Converting them, and serving the modern version with the original as a fallback, is usually the single largest win.

2. Served larger than they display

A 2000-pixel image dropped into a slot that shows it at 600 pixels means the browser downloads three times the data it uses. The fix is responsive sizes, which WordPress sets up with srcset, as long as the right sizes exist and nothing has stripped the markup.

3. Compressed too lightly

Even at the right size and format, an image saved at near-maximum quality carries more data than the eye can see. Lowering the compression quality to a sensible level shrinks the file with no visible difference. WordPress default quality is adjustable, and optimization plugins apply stronger compression on top.

4. Oversized originals

Multi-megabyte files straight from a phone or camera. WordPress 5.3 scales anything over 2560 pixels down, which prevents the worst case, but 2560 pixels is still larger than most slots need, so the scaled image is still heavier than necessary and still in the original format.

5. A page builder or slider bypassing srcset

Some builders, sliders, and galleries output their own image markup without the WordPress responsive srcset, so the browser is handed the full image with no smaller option. The fix is to configure the builder to size images correctly, or to optimize the source so even the full image is light.

6. Offscreen images loading too early, or no CDN

Images far below the fold loading immediately compete with what the visitor actually sees. Native lazy loading defers them, though never the top LCP image. And without an image CDN, every image is served from the origin at a fixed size, where a CDN could resize and convert at the edge per device.

WebP vs AVIF vs JPEG

The format choice is the biggest lever, so it is worth understanding the trade-off rather than guessing. The three formats sit on a scale of compression against compatibility.

FormatSize vs JPEGWhere it fits
AVIFUp to 50% smallerThe most efficient. Supported by most modern browsers, slower to create. Serve it first.
WebP25 to 34% smallerNearly universal browser support, fast to create. The safe default to add if you add only one.
JPEGBaselineUniversally supported. Keep it as the fallback for any browser that cannot take WebP or AVIF.

The right approach is not to pick one but to serve a chain, AVIF first, then WebP, then JPEG, and let each browser take the best format it understands. A good optimization plugin generates the modern versions and serves the right one automatically, so you get AVIF where it works, WebP almost everywhere else, and JPEG as the safety net, with no broken images anywhere.

DIY vs hand it off

Installing one image plugin and bulk-optimizing is a reasonable self-fix. A page builder that strips srcset, a host without AVIF support, or a large library that must not break is where handing it off helps. If the left column matches you can likely do this. If the right column matches, get help.

Realistic on your own

  • You can install one reputable image optimization plugin
  • You want it to convert to WebP and bulk-optimize the library
  • Your theme outputs normal images with the WordPress srcset intact
  • You can read the PageSpeed image audits and see which fail
  • You are comfortable setting a compression quality in the plugin
  • The fix is one library pass, not a structural problem

Hand it off, save the time

  • A page builder or slider is serving full-size images with no srcset
  • Your host does not support AVIF and you want it enabled
  • You have several overlapping image plugins to untangle
  • The library is large and must be optimized without breaking layout
  • You want an image CDN configured to resize and convert at the edge
  • PageSpeed still flags images after you tried a plugin

How to diagnose it

Work in this order. The audits tell you which lever is failing before you change anything.

1
Run PageSpeed Insights and read the image audits

Look for Serve images in next-gen formats, Properly size images, and Efficiently encode images. Each names the specific images and the savings, telling you whether the problem is format, dimensions, or compression.

2
Check your host supports WebP and AVIF

In Tools then Site Health then Info, the Media Handling section shows whether your server can produce WebP and AVIF. AVIF needs Imagick or LibGD built with AVIF support.

3
Find the heaviest images

PageSpeed lists them by potential saving, or open the browser network tab, filter to images, and sort by size. The few biggest files are usually most of the problem.

4
Compare each image format and size to its slot

For a heavy image, note its format and pixel dimensions, then how large it actually displays. A big gap means wrong size, an old format means convert, a large file at the right size means compress.

5
Confirm srcset is present and not stripped

View the page source on a content image and check for a srcset attribute with multiple sizes. If it is missing, a page builder or theme is bypassing the WordPress responsive markup.

How to fix it

Each branch is one lever. Most sites need the first, and many need all three. Test with PageSpeed after each.

Convert to WebP and AVIF

The biggest win, and the one WordPress will not do alone. The simplest route is a single image optimization plugin that converts the library and serves the modern format with a fallback. To do it in code, the image_editor_output_format filter makes WordPress output generated sizes as WebP.

// Output generated sub-sizes as WebP instead of JPEG/PNG
add_filter( 'image_editor_output_format', function ( $formats ) {
    $formats['image/jpeg'] = 'image/webp';
    $formats['image/png']  = 'image/webp';
    return $formats;
} );

To serve a format chain by hand, the picture element offers AVIF, then WebP, then JPEG, and the browser takes the first it supports.

<picture>
  <source srcset="photo.avif" type="image/avif">
  <source srcset="photo.webp" type="image/webp">
  <img src="photo.jpg" width="1200" height="800" alt="...">
</picture>

Compress and cap originals

Lower the compression quality for smaller files, and cap how large originals are stored so nothing oversized lingers.

// Lower the default image quality (82) for smaller files
add_filter( 'wp_editor_set_quality', function () {
    return 75;
} );

// Cap stored originals at 1920px instead of the 2560px default
add_filter( 'big_image_size_threshold', function () {
    return 1920;
} );

Most image plugins expose the same quality control in their settings, so you rarely need the code if a plugin is already in place.

Serve the right size and lazy-load

Make sure WordPress responsive sizes are reaching the browser, and that offscreen images defer while the top image does not.

<!-- WordPress adds this automatically; a builder may strip it -->
<img src="photo-1024.webp"
     srcset="photo-480.webp 480w, photo-1024.webp 1024w, photo-1920.webp 1920w"
     sizes="(max-width: 600px) 480px, 1024px"
     width="1920" height="1080" loading="lazy" alt="...">

<!-- The top LCP image stays loading="eager", never lazy -->

If a builder or slider is stripping srcset, configure it to use WordPress image sizes, or replace it with one that does.

Builder stripping srcset, no AVIF on your host, or a big library to optimize safely?

Let us optimize your images in 2 hours →

A real image-optimization session

A composite from the image optimization work we do most weeks, with identifying details removed.

Scenario

A photography-led business site looked beautiful but loaded slowly, and PageSpeed flagged Serve images in next-gen formats and Properly size images with several megabytes of potential savings. The owner had uploaded full-resolution JPEGs straight from the camera into galleries, and a slider on the homepage was serving them at full size.

Diagnosis

Two levers were untouched. Every image was still JPEG, so the next-gen format win was completely unrealized, WordPress having never converted them. And the homepage slider output its own markup without the WordPress srcset, so phones were downloading the full-size gallery images. Site Health confirmed the host could produce both WebP and AVIF.

Resolution

We installed one image optimization plugin, converted the library to WebP and AVIF with the JPEG kept as a fallback, set a sensible compression quality, and capped the big-image threshold. We reconfigured the slider to use WordPress image sizes so phones got the small responsive versions. Page weight fell sharply, both image audits cleared, and the galleries looked identical.

Total elapsed
Library converted and the slider fixed inside the 2-hour window, with no visible change to the photos.

When to stop and hand it off

Installing a plugin and bulk-optimizing is a fine self-fix. Hand it off when the images are tangled into something else. First, a page builder or slider is serving full-size images and stripping the responsive markup, which needs configuring at the builder level. Second, your host cannot produce AVIF and you want it enabled. Third, you have several overlapping image plugins fighting each other and adding weight. Fourth, the library is large and important and must be converted without any risk to the layout. We pick one plugin that fits your host, convert to WebP and AVIF with a JPEG fallback, set sensible compression, restore responsive sizes where a builder broke them, and add an image CDN where it helps, all without changing how anything looks. Flat $49 to $149, done in two hours when scope fits, money back if we cannot improve your measured image weight.

Get a quote in 60 seconds

WordPress image optimization FAQ

Does WordPress optimize my images automatically?

Partly, and the part it leaves to you is the biggest one. WordPress does several helpful things on its own. Since version 4.4 it generates multiple smaller copies of every image you upload and adds the responsive srcset markup so the browser can pick an appropriately sized one. Since 5.3 it scales any image with a side longer than 2560 pixels down to 2560 on upload, so a giant camera file does not get used at full size. And since 5.8 and 6.5 it can serve WebP and AVIF, the modern formats. But here is the gap: WordPress does not automatically convert your existing JPEG and PNG uploads into WebP or AVIF. It supports those formats, meaning you can upload them, but it will not turn your JPEGs into them for you. Since converting to a modern format is usually the single biggest file-size win, the most valuable image optimization is the one piece WordPress leaves you to add, with a plugin or a filter.

What does "Serve images in next-gen formats" mean in PageSpeed Insights?

It means your images are in older formats, JPEG or PNG, and you could make them significantly smaller by switching to a modern format like WebP or AVIF at the same visual quality. Next-gen is just Google's name for those newer formats. WebP files are typically 25 to 34 percent smaller than the equivalent JPEG, and AVIF can be up to 50 percent smaller, all without a visible quality drop. Because images are usually the heaviest part of a page, that reduction directly speeds loading, especially on mobile connections. The audit is telling you that the format, not just the size, is leaving easy savings on the table. The fix is to convert the images to WebP or AVIF and serve those to browsers that support them, with the original JPEG kept as a fallback for any that do not. WordPress will not do this conversion automatically, so it is done with a plugin or a small filter.

Should I use WebP or AVIF?

Use both, served in order of preference, because they trade off compression against browser support. AVIF is the more efficient format, often around 50 percent smaller than JPEG at the same quality, but it is supported by fewer browsers and is slower to create. WebP is slightly less efficient, around 25 to 34 percent smaller than JPEG, but it is supported by essentially every current browser and is fast to produce. The clean answer is not to choose one but to serve a chain: offer AVIF first, fall back to WebP, and fall back to the original JPEG for any browser that supports neither. The browser automatically takes the best one it understands. Good optimization plugins handle this chain for you, generating the modern versions and serving the right one to each visitor. If you must pick a single format to add, WebP is the safe universal choice, and AVIF is the bonus on top.

My images look fine, why does the file size matter so much?

Because how an image looks and how much it weighs are two different things, and a photo can look identical at a fraction of the file size. A camera or phone saves images for archival quality and large prints, with far more data than a web page needs, often several megabytes each. On screen, the same photo compressed properly and sized for its display slot can look exactly the same at a tenth of the weight. The difference is invisible to the eye but very visible to the loading time, because every one of those megabytes has to travel to the visitor, and on a phone on a mobile connection that is slow. Images are usually the single largest part of a page's total weight, so unoptimized images are often the main reason a site is slow even when nothing looks wrong. Optimizing them changes the weight, not the appearance.

What does "Properly size images" mean and how is it different from compression?

Properly size images is about dimensions, while compression is about quality, and they are separate savings you want both of. Properly sizing means not sending a 2000-pixel-wide image to a slot that only displays it at 400 pixels, because the browser downloads all 2000 pixels and then shrinks them, wasting most of the data. The fix is responsive images: providing several sizes and letting the browser pick the one that fits, which WordPress sets up automatically with srcset as long as the right sizes exist and a page builder has not stripped them. Compression, by contrast, is reducing the data used to store each pixel, the quality setting, which makes the file smaller at the same dimensions. A fully optimized image is both correctly sized for where it appears and compressed to a sensible quality, and in a modern format. Skipping either one leaves savings behind, which is why PageSpeed has separate audits for each.

I uploaded a huge image from my phone. Does WordPress handle that?

It softens the problem but does not fully solve it, so you still have work to do. Since WordPress 5.3, any image you upload with a side longer than 2560 pixels is automatically scaled down to 2560 pixels, and that scaled version, not the giant original, is what gets used across your site. So a 6000-pixel phone photo will not be served at full size. That is a useful guardrail. But 2560 pixels is still large for most places an image actually appears, a blog body is often under 800 pixels wide, so the scaled image is still bigger than needed for most slots, which is where responsive srcset sizes come in. And scaling does not convert the format or compress aggressively, so the file can still be heavy. The honest summary is that WordPress prevents the worst case, a multi-megabyte full-resolution image, but proper optimization, the right size for each slot, strong compression, and a modern format, is still up to you.

Will an image optimization plugin slow my site down?

A good one does its heavy work in the background, not on every page load, so it speeds the site far more than it costs. The work of converting and compressing images happens once, when you upload an image or when you bulk-optimize your existing library, and it runs in the background on the server rather than while a visitor waits. After that, the visitor simply receives the already-optimized, already-converted file, which is smaller and faster. So the runtime cost to a visitor is essentially zero and the benefit is a much lighter page. The thing to watch is plugin sprawl: you want one well-chosen image plugin doing format conversion, compression, and serving the right size, not three overlapping ones each adding their own scripts. We pick a single plugin that fits the host, configure it to convert to WebP and AVIF with a sensible quality, bulk-optimize the existing library, and remove any redundant image tools.

Can you optimize my whole image library without breaking the layout?

Yes, and that is a routine job. We start by measuring with PageSpeed Insights and the browser tools to see which images are the heaviest and which audits are failing, next-gen formats, properly size, or efficient encoding. Then we set up a single image optimization plugin that fits your host, convert your existing JPEGs and PNGs to WebP and AVIF with the original kept as a fallback, apply sensible compression, and confirm WordPress is serving correctly sized responsive images, restoring srcset if a page builder stripped it. We bulk-optimize the existing library in the background and verify the layout is untouched, since optimization changes file weight, not dimensions or appearance. Where it helps, we add an image CDN that resizes and converts at the edge. Flat $49 to $149, done in two hours when scope fits, money back if we cannot improve your measured image weight.

Sources and further reading

Every technical claim on this page traces back to the WordPress core development notes or the web.dev image documentation.

Why we optimize images faster than trial and error

2h

2-Hour Guarantee

Images optimized in 2 hours or your money back. Format, compression, size, and delivery in one pass.

$49

Flat Rate $49 to $149

No hourly billing. WebP and AVIF conversion, compression, and responsive sizes sorted out.

100%

Money-Back Guarantee

Cannot improve your measured image weight? You do not pay.

Get your WordPress images optimized

We convert to WebP and AVIF, compress, and serve correctly sized responsive images, the format win WordPress leaves to you. Flat $49 to $149, done in 2 hours when scope fits, money back if we cannot.

Optimize My Images