Back to Guides

Vyso Guides

Automatically resize images in WordPress

Updated October 7, 2026
WordPressImage resizingMedia Library

WordPress can resize images automatically when you upload them. It creates smaller versions for your theme and, for sufficiently large uploads, a scaled version used as the full-size image. To control the result, choose the sizes your pages need, configure future uploads, and regenerate the relevant versions of existing images.

First decide what you want to change. A smaller download for readers, a lower maximum upload resolution, and less storage on the server need different settings. Shrinking an image visually with CSS changes its appearance; the browser can still download a large file.

What WordPress resizes on upload

WordPress generates image variants from the sizes registered by core, your theme, and plugins. Its responsive image markup can offer those variants through srcset, while sizes describes the image's expected display width. The browser chooses a candidate using that information and the device's pixel density. This is the native basis for responsive images in WordPress.

The largest version needs a separate check. The default big-image threshold is 2560 pixels on either dimension. Eligible images above the threshold are scaled proportionally. Other code can change or disable the threshold, and processing requires a working image editor.

Core's image creation routine records the uploaded original separately when it creates a scaled full-size version. Automatic scaling therefore does not mean the original disappeared from storage. An image resizer plugin may handle originals differently.

Choose dimensions from the actual layout

Measure the widest place an image appears before choosing a maximum. For example, an article photo displayed at 900 CSS pixels could use a 1800-pixel source for a 2x display. A 360-pixel archive card needs a much smaller candidate. These are calculations for those layouts, rather than standard sizes every WordPress site should use.

Check whether the same attachment also appears in a full-width banner, product zoom, or downloadable portfolio. A maximum chosen for article content can remove detail needed by another use. Keep a separate high-resolution master when readers or editors need it.

Portrait images deserve their own test. A limit on both dimensions can make a tall photograph narrower than expected. For a proportionally resized image, the dimension that reaches the limit first determines the final dimensions.

Configure the built-in image sizes

  1. Open Settings > Media in the WordPress dashboard.

  2. Set thumbnail dimensions and decide whether thumbnails should use a fixed crop.

  3. Set medium and large maximum dimensions using your measured content widths.

  4. Save, upload a test photograph, and check its use in an article and an archive page.

The Media settings screen controls these standard sizes. Themes can register additional sizes, so changing Large does not necessarily change an archive card or featured image. The thumbnail size on that screen also differs from a theme's post-thumbnail size.

A setting change affects subsequent image generation. It does not automatically rebuild all files already in the Media Library. Keep the existing-image work as a separate step so you can check which templates use each size.

Lower the full-size threshold with code

If your layout needs a smaller ceiling for large uploads, a developer can use big_image_size_threshold. This example sets a 1800-pixel maximum on either dimension:

add_filter( 'big_image_size_threshold', function ( $threshold ) {
    return 1800;
} );

Place the snippet in an existing site-specific plugin or snippet manager, or in a child theme if the policy belongs to that theme. Test on staging before enabling it for contributors. Editing a parent theme's files makes the change vulnerable to theme updates.

The threshold applies when WordPress processes eligible images. It does not introduce an arbitrary file-size limit in kilobytes, control JPEG quality, or rebuild existing attachments immediately. Use the WordPress image compression guide when the dimensions are appropriate but the encoded file is still too large.

Use an image resize plugin for upload rules

A WordPress image resize plugin is useful when editors need a dashboard control for a maximum width or height. Compare its handling of originals and existing images before choosing it.

Resize Image After Upload supports automatic resizing of JPEG, GIF, and PNG uploads with configurable limits under Settings > Resize Image Upload. Its documented workflow also offers JPEG recompression and conversion of opaque PNGs to JPEG. Its FAQ says it does not resize previously uploaded images and that resizing or recompression discards the original uploaded file and EXIF data.

That makes the plugin an upload policy, with different storage behavior from core's scaled-image handling. Save masters elsewhere before adopting it. Its listed format support should also be checked against a library that contains WebP or AVIF.

EWWW Image Optimizer lists resizing on upload and in bulk. It is an alternative to evaluate when you need to apply a resize policy to an existing library. Check the active processing mode, backup settings, and hosting requirements before starting a batch.

Resize existing images and rebuild their variants

Separate resizing the main attachment from regenerating smaller versions. Rebuilding thumbnails lets a template request a newly configured size. Reducing an oversized original needs a workflow that explicitly processes the main image.

For a single attachment, open it in the Media Library and use Edit Image, then Scale Image. WordPress's media editing documentation explains scaling and restoration. Check the resulting attachment and its public page after saving.

For WordPress bulk resize work, start with a backup of uploads and the database. Keep the active theme and its registered sizes consistent with production. Process a few representative attachments first, including a portrait and an image used in several places.

WP-CLI can regenerate an attachment's registered sizes. This example uses attachment ID 123:

wp media regenerate 123 --skip-delete

The command documentation describes --skip-delete as retaining old thumbnails that regeneration would otherwise remove. It is useful when external pages may still reference older URLs. Regeneration can still rewrite generated files; that option does not replace a backup. Use --only-missing only when you want missing sizes created, rather than existing sizes rebuilt.

For a large library, use manageable batches and record failed attachments. Recheck disk space as you go: retaining old variants while generating new ones can increase usage. Avoid deleting an entire size family until you know whether page builders, older posts, or outside links still use it.

Check the image the browser actually requests

Open a public page while logged out. In browser developer tools, select the image and inspect src, srcset, and sizes. The image's currentSrc property identifies the selected resource.

Compare that resource with the displayed width at mobile and desktop sizes. A wider download can be appropriate on a high-density screen. A 4000-pixel image used for a small card deserves investigation, especially if smaller candidates exist.

If old dimensions remain, check whether the template requests Full Size, whether the expected variant exists, and whether cached HTML contains old markup. Page builders may use CSS background images that do not receive the same responsive behavior as a normal image element.

Keep one test page with an article image, an archive card, and a featured image. After a theme change, upload a fresh test file and inspect those placements again. This catches a new registered size or template request before the next bulk resize.

Keep going

Make the media library less work.

See how Vyso brings search, enrichment, cleanup, and delivery into one product.

Start free