Images are usually the largest asset a site ships and the simplest to fix. The build lists every one with its size and the pages that load it, including the sizes WordPress generated that you forgot existed. That’s a better starting point than opening the media library and scrolling.
StaticScope copies images; it doesn’t convert or compress them. Whatever format and dimensions WordPress serves are what gets published. That’s good for predictability and bad if the source images were never prepared.
What the build shows you
Filter Preview files by Images and sort by size. Open one to see the image, the pages that use it and how. The preview in the detail is served from WordPress, so you can see what a file is before deciding it’s junk.
The folder contains every candidate in a srcset, including ones your screen did not pick. That can be five files for one photo. It also contains background images and icons named in CSS. Page size counts only the main source, so a page can look reasonable while the folder carries three times the pixels.
The alternative image sizes section is the list of what WordPress generated for that page. If it runs to dozens of files for three photographs, the theme or an image plugin is making too many sizes.
Formats
JPEG for photographs, PNG for flat graphics and transparency, SVG for logos and icons, WebP or AVIF for photographs when you want fewer bytes. That’s still the short version in 2026, even though AVIF often wins on bytes.
WordPress has accepted WebP uploads since 5.8 and AVIF since 6.1, if the server’s image library supports it. It generates the usual sizes and puts them in the srcset. It doesn’t automatically hand an AVIF to a browser that can’t take one; that’s what picture elements or a CDN are for. Check what your site serves before assuming you’re on AVIF.
The build won’t convert anything. If a plugin converts images on the fly and rewrites the URL, the built HTML points at the converted file and that’s what ships. If conversion happens at a CDN, the image may not be in the build at all. Both are valid; they move the problem outside the inventory.
Dimensions beat bytes
A 120 KB image can still be oversized if it’s 3000px wide and displayed at 300px. A 400 KB image can be fine if it’s a full-bleed hero. Check the pixel dimensions, as well as the file size. On macOS:
sips -g pixelWidth -g pixelHeight wp-content/uploads/2026/03/hero.jpg
Aim for the largest width the image is displayed at, times two for high-density screens. A 700px content column needs about 1400px. A full-bleed hero at 1440 needs 2880 at most. Most camera files are 4000px or more, and most of those pixels are thrown away on every screen.
Rough targets: a hero at 150–300 KB, an in-content image at 40–100 KB, a card thumbnail under 30 KB. These depend on the picture. A detailed photograph needs more than a flat illustration. The target is there to make an outlier obvious, not to force every image to the same number.
srcset and sizes
WordPress generates thumbnail, medium, medium-large, large and the larger 1536 and 2048 sizes when the aspect ratio allows. It puts them in a srcset, and the browser picks one based on viewport, pixel density and the sizes attribute.
If sizes says the image is 100vw when it’s a 300px card, the browser downloads a much bigger file than it needs. Themes that don’t set sizes get WordPress’s default, which assumes the image fills the viewport up to its own width. Fix it for fixed-width images with the wp_calculate_image_sizes filter or the block’s own settings. This is one of the few changes that helps every visitor without touching a single file.
You can remove image sizes you never use with intermediate_image_sizes_advanced, but existing uploads keep their old files. The srcset stops referencing them, so a rebuild won’t copy them unless something else links to them. The trade-off is that content which hard-codes one of those URLs will break. Check before pruning.
Lazy loading
WordPress adds loading="lazy" to images in content, skipping the first one, and the build preserves the attribute. Native lazy loading is cheap and works without JavaScript. It helps the first render; it doesn’t reduce the total bytes a visitor eventually downloads.
The page-size estimate counts lazy images anyway, because the page still loads them. Don’t read a big page size as “all of this blocks first paint”. Read it as “this is the bill if the visitor scrolls”.
Keep the hero and the first image eager, and mark the likely LCP image with fetchpriority="high". Don’t lazy-load a logo in the header or a hero above the fold; you’ll delay the image you most want to show.
Compression
StaticScope doesn’t compress images. Compress before upload, or use a tool that rewrites the files in the media library. JPEG quality around 75–85 is usually indistinguishable at normal sizes. WebP around 70–80. Strip metadata you don’t need. Never upscale a small image to fill a big slot; it looks worse and costs more.
ImageOptim, Squoosh, cwebp and avifenc all do the job without a plugin. An image optimisation plugin does it inside WordPress and keeps the originals, which is convenient and adds weight. Pick one and be consistent.
Some hosts compress or resize images on the fly. That’s outside the build and outside the report. It can be a good safety net; it can also mean the bytes you measured aren’t the bytes a visitor gets.
When you replace an image, change the file name or clear the CDN cache. Hosts cache images aggressively; a same-name replacement can leave returning visitors with the old file for weeks.
Spotting the bad ones
- Sort images by size. Open the top twenty. Anything over 500 KB needs a reason.
- Check dimensions. Compare the pixel width with the widest place it appears.
- Look for duplicates.
-scaled,-1,-copyand the same photo re-uploaded under a new name. - Check unused images. With Every upload on, the Not used filter lists everything in the library the pages never touch. That’s a media-library audit, not a page-weight one.
- Read the alternative sizes. A page with 25 image files for four pictures is generating too much.
- Check external images. A CDN or stock-photo URL isn’t in the build. It won’t show in the sizes or the page total.
cd wp-content/uploads/staticscope-processed-site
# Images over 300 KB
find . -type f \( -name '*.jpg' -o -name '*.jpeg' -o -name '*.png' -o -name '*.webp' -o -name '*.avif' \) -size +300k -print
A sensible order
- Delete images nothing uses.
- Resize the biggest ones to the width they’re displayed at.
- Convert photographs to WebP or AVIF where the site supports it.
- Fix
sizesfor fixed-width images. - Lazy-load below the fold, keep the hero eager.
- Add an image CDN only if you need per-device crops. It’s another dependency, and the build no longer owns those files.
Then rebuild and compare the same page. The folder will show the old files gone and the new ones smaller. If the page size barely moves, the images weren’t the problem.
File sizes aren’t transfer sizes. The build measures the files on disk. Host compression, CDN format negotiation and caching change what a visitor downloads. External images aren’t in the build at all, so a page can look light here and still arrive heavy.