Pages & images

WordPress thumbnail and image sizes: settings, custom sizes and regeneration

Pages & images · · Published 2026-09-29

Small instant photo prints scattered on a dark table beside a camera, with lights glowing behind
Instant photo prints scattered on a table beside a camera.

Every time you upload an image, WordPress quietly makes several resized copies. Knowing which ones, and how to change them, solves most "blurry thumbnail" and "wrong crop" problems.

This address once hosted the ShiftThis "Thumbnail Size" plugin from the WordPress 2.x era, which is discontinued and not available here. The size settings it dealt with are now built into WordPress and described below.

The sizes WordPress creates

When you upload a JPEG, PNG, WebP or (on servers that support it) AVIF image, WordPress keeps the original and generates resized versions. The defaults are:

NameDefault maximumCropped?Editable in Settings
thumbnail150 × 150 pxYes, by defaultYes
medium300 × 300 pxNoYes
medium_large768 px wideNoNo
large1024 × 1024 pxNoYes
1536x1536, 2048x2048Those dimensionsNoNo

A size is only generated if the original is larger than it. Themes and plugins can add their own sizes, so a single upload may produce a dozen files. Since WordPress 5.3, very large uploads are also scaled down: if an image is wider or taller than 2560 pixels, WordPress creates a "-scaled" version and uses it as the main image, while keeping the original file. The big_image_size_threshold filter changes or disables this limit.

Changing the standard sizes

Go to Settings → Media. You can set the width and height of Thumbnail, Medium and Large, and choose whether thumbnails are cropped to exact dimensions or scaled proportionally. Enter 0 for one dimension to leave it unconstrained. The page is documented in the Media Settings screen article.

New values apply only to images uploaded from then on. Existing files are not touched; see regeneration below.

Registering a custom size

If your design needs, say, a 1200 × 630 crop for article headers, register it in your theme's functions.php or a small plugin with add_image_size():

add_action( 'after_setup_theme', function () {
    add_theme_support( 'post-thumbnails' );
    add_image_size( 'article-header', 1200, 630, true ); // hard crop
} );

The fourth argument controls cropping: true crops from the centre, an array such as array( 'center', 'top' ) sets the crop position, and false scales proportionally. To make a custom size selectable in the editor's image size dropdown, add it with the image_size_names_choose filter.

The featured image ("post thumbnail") size used by a theme is set with set_post_thumbnail_size(), and displayed with the_post_thumbnail( 'article-header' ).

Regenerating existing images

After changing sizes, older uploads still have files at the old dimensions. To rebuild them:

Back up first, and run large jobs at quiet times; resizing thousands of images is CPU-intensive. Regeneration does not update image URLs hard-coded inside old post content. If posts embed a specific old size by its file name, those references keep pointing to the old file, so do not delete old files blindly.

Responsive images

Since WordPress 4.4, images inserted in content get srcset and sizes attributes listing the available versions, so browsers download the smallest file that fits the screen. This is why removing intermediate sizes can backfire: fewer versions means larger downloads on phones. Since 5.5, WordPress also adds loading="lazy" to most images, and recent versions avoid lazy-loading the first large image at the top of the page, which matters for page speed.

Photo-heavy sites feel this most: an estate agency with twenty pictures per property is a typical case, and our look at running property listings on WordPress covers what that means for speed and hosting. Image weight is also an accessibility issue, as our guide to accessible themes points out.

Reducing wasted space

Sites with many registered sizes can store a dozen files per upload. If disk space matters:

Fixing blurry or badly cropped thumbnails