Privacy

How to size WordPress images: a practical Media Library workflow

Match image dimensions to the page, choose a usable format, add the right alternative text and verify the actual file delivered on desktop and mobile.

Made by Pagember · Editorial policy

Primary sources + editorial analysisPublished Updated Sources

The short answer

Size each image for its actual slot and purpose rather than one universal width. Keep the original outside the site, crop for meaning, export a suitable format, and insert it from the Media Library with a fitting resolution; for a column about 700 pixels wide, a source around 1400 pixels stays sharp. Then check which file the browser really downloads on desktop and mobile.

On this page11 sections

Size WordPress images for the space and purpose they have on the page, then verify what the browser actually downloads. Preserve the original, prepare a suitable crop and format, insert it through the Media Library, choose an appropriate image resolution and check desktop and mobile. Making the visible image smaller is not proof that the downloaded file became smaller.

WordPress official logo above a conceptual chain diagram: Source image, Size + format, Page delivery.

There is no single best pixel width or file-size target for every WordPress image. A full-width photograph, a small portrait and a screenshot containing text have different needs. This is a documented workflow, with a hypothetical sizing example rather than a claimed performance experiment.

Before changing the library

Confirm you own or are licensed to use the image. Keep an original outside the website and a recovery set before broad media changes. For a first pass, use one synthetic draft and one image, not a bulk optimizer across every published article.

Write down where the image appears: article column, wide header, card or avatar. Check that slot at desktop and phone widths. Note whether the page also crops the image for a listing card or social preview; one file can appear in several layouts.

Open its Media Library attachment details and record the current dimensions, file type and size. Those fields describe the stored asset. They do not prove which responsive variant a visitor receives.

1. Separate source pixels from display size

The intrinsic dimensions are the pixels in the image file. The rendered dimensions are the size of its box on the page. A photograph can be thousands of pixels wide while appearing in a narrow column. CSS can shrink the box without changing the source file's download.

MDN's image-performance guidance explains matching the supplied image to the required display and reserving its space. Pixel density can also affect the needed source resolution, so assess sharpness on the intended devices rather than simply matching a CSS width one-for-one.

WordPress creates its own copies at upload. With the defaults in Settings > Media, it makes a 150 × 150 thumbnail, a medium copy up to 300 pixels and a large copy up to 1024 pixels, and it also generates 768, 1536 and 2048-pixel-wide versions for responsive images. Uploads wider than 2560 pixels are scaled down to 2560 and saved with -scaled in the file name. To find your article column width, check Appearance > Editor > Styles > Layout in a block theme, or measure the image box in your browser's developer tools. For a column about 700 pixels wide, a source around twice that width, roughly 1400 pixels, stays sharp on high-density screens without sending a 4000-pixel original.

2. Crop for meaning before compressing

Remove irrelevant borders or empty space when that improves the explanation. Preserve the part readers need: a face, diagram label or interface control. For screenshots, check that text remains readable after the intended resize; splitting a complex screenshot may work better than shrinking it until every label is tiny.

WordPress's media editor distinguishes scaling and cropping and provides restoration controls. Keep the independent original anyway. A library-level edit can affect reuse, while a block's visual crop may affect only that appearance.

Use a separate candidate for a substantial change and review every important use before replacing the published asset. A photograph cropped for a square card may lose its subject in a wide header. Do not delete the existing file until references and recovery are understood.

3. Choose and inspect a suitable format

MDN's format guide describes the tradeoffs. JPEG remains useful for photographs; PNG can suit lossless detail and transparency. WebP and AVIF can be candidates for efficient delivery where the environment supports them. Choose by visible quality and actual output, not the extension alone.

Export a candidate with sensible dimensions and compression, then inspect edges, gradients and small text at the intended display size. Compare its file size with the original. Do not repeatedly recompress a lossy file as the master; return to the preserved source when making another variant.

Confirm upload and image processing work on your host. WordPress's AVIF support note includes an environment requirement. Browser support does not establish server support, and renaming a file extension does not convert its format; our guide to WebP and AVIF compatibility in WordPress covers the checks. A paid optimization plugin is optional when the existing tools already meet the need. If you already use WP Rocket for caching, its media settings add lazy loading for images and can add missing width and height attributes, which helps reserve space as images load.

4. Insert from the library and choose the resolution

Add an Image block to the draft and select the intended Media Library item. In the block settings, distinguish Resolution from display Width, Height and Aspect ratio. Available resolutions depend on the theme and original upload.

Choose a file resolution that preserves the required detail without automatically requesting the largest original. Keep the aspect ratio unless a deliberate crop is part of the design. Review the focal point where the theme or block uses a cover crop, and avoid a fixed height that distorts or clips important content on phones.

WordPress's responsive-image support can provide source candidates and sizing information for the browser. Themes, optimization plugins and custom markup can alter it. Check the delivered page rather than assuming that selecting Medium or Large always produces the right result.

5. Describe the image's purpose

Use W3C's alt decision tree to decide what the image contributes. An informative image needs a concise equivalent of its relevant meaning. A complex diagram also needs its essential explanation in the surrounding text. Avoid stuffing unrelated keywords into the alternative.

A purely decorative image should use empty alternative text so assistive technology can skip it. If the image is the only content of a link or button, its accessible name must communicate that function or destination. Decoration and function are different decisions.

Check the individual block's alternative text. A library default can be useful, but the same image may serve a different purpose elsewhere. Add a visible caption when all readers need context or attribution; the filename and attachment title are not substitutes for a useful alternative.

6. Verify the real page

Desktop and phone
Subject remains visible; labels readable; no horizontal overflow
Delivered resource
Correct image request, source dimensions and sensible transfer size
Layout
Space is reserved as the image loads; proportions remain correct
Meaning
Contextual alt, caption and link purpose are appropriate
Reuse
Article, card and header crops still work

Use the browser's inspection and network tools if needed to identify the selected resource. Check a fresh logged-out page after the change, with consistent cache handling. A sharper screenshot and a lower file size are useful observations; they do not establish a measured overall speed improvement.

Do not apply lazy loading blindly to every image. Below-the-fold images can be delayed, while an initially visible main image, especially the Largest Contentful Paint image, should not be held back by lazy loading. Determine the actual page behavior before changing a global setting.

If the result is wrong

If the image is blurry, compare the selected variant with the rendered size and original detail. If a crop removes the subject, adjust the specific block or restore the candidate. If the old image persists, verify the saved source and clear the relevant cache rather than uploading repeated duplicates.

If upload or processing fails, record the file type, dimensions and exact error and check host support. Do not raise server limits at random. Restore the working draft or asset when necessary, keeping the original and documenting the unresolved condition.

Common questions

Should every image be the same width?

No. Use the actual slot and required detail. Consistent design does not require identical source pixels for a portrait and a wide diagram.

Can I delete all “unattached” media?

Do not treat that label as proof that nothing uses the file. Check templates, reusable content and plugin references before removal.

Does smaller mean better?

Only while the image still communicates its purpose. Unreadable text or damaged detail defeats the reason for including it.

Will optimized images guarantee better Google rankings?

No. Useful content and sound delivery help readers, but a file-size reduction does not guarantee a ranking outcome.

Investigate the wider page when needed

Read the WordPress speed-diagnosis guide for other bottlenecks, the cache guide when the old image persists, and the private-copy workflow before broad plugin or theme changes.