How do images get resized when they’re uploaded to WordPress?

Images in WordPress are very simple; just drag-drop the file straight into the media library or directly into a page and then you can reuse it as much as you want.

Behind the scenes, WordPress does quite a bit of work. Rather than using the exact same image file everywhere on your website, by default WordPress creates several resized versions of each image, allowing it to serve an appropriately sized image depending on where and how it is being displayed.

The image sizes are determined by the fields found when logged in as an administrator and going to Settings Media (or adding /wp-admin/options-media.php to your web address).

Inside, you can specify your Thumbnail, Medium and Large image sizes, and it will follow those rules for every uploaded image 1. This is what that page looks like on a fresh install:

Screenshot of the default WordPress media settings page.

The default settings consist of:

  • Thumbnails are 150×150 and cropped
  • Medium-sized images are 300×300
  • Large images are 1024×1024
  • All images are placed in their own year- and month-based folders
    • This follows the format YYYY/MM/<image-name>

Using code 2, it is possible to create additional image sizes beyond what is available in the settings, and some plugins (like WooCommerce) will add their own – but this can drastically increase the storage size taken up by the media library.

Note: unless they need to be retained for migration purposes, for new websites I will usually change these to make Thumbnails 256×256 cropped, Medium to 512×512 and large remains at 1024×1024.

Let’s look into what happens under the hood when an image is uploaded, and what happens when the image size settings are changed.

How the original and “Full” image is processed

When an image is uploaded to WordPress, the original file is stored on the server and is referred to as the Full size within the editor.

However, since version 5.3 if a particularly large image is uploaded, WordPress will automatically create a smaller version of it. This file has -scaled appended to its filename 3.

While the original image is retained, WordPress will treat the scaled version as the full-size image used throughout the website in order to prevent unnecessarily large images from being served.

By default, images are have a maximum dimension of 2560 pixels – but this can be disabled or changed using code 4.

Image aspect ratios are retained during resize

Regardless of whether WordPress is resizing the image, it will maintain a consistent proportion to the original. The only time this doesn’t apply is if the thumbnail (or another size set in code) is set to crop.

For instance, if an image is uploaded with a 3:2 ratio at a size of 3000×2000, it will create a scaled version exactly 2560×1707.

The longer side is reduced to the target size, whereas the shorter side is reduced to match the original image aspect ratio. But if the original image was 2000×3000 (portrait rather than landscape) it would be reduced to 1707×2560 instead.

The same process happens to all image sizes.

How WordPress creates multiple image sizes

When an image is uploaded, WordPress creates several additional versions at different dimensions.

Taking the above example, and applying the default media settings, this is what you get:

  • Original: 3000×2000
  • Scaled: 2560×1707
  • Large: 1024×683
  • Medium: 300×200
  • Thumbnail: 150×150
    • If cropping is disabled, it becomes 150×100

As mentioned, the exact dimensions depend on your WordPress configuration, active theme and installed plugins.

In this example, a file called team-photo.jpg results in the following files:

  • team-photo.jpg
  • team-photo-scaled.jpg
  • team-photo-1024x683.jpg
  • team-photo-300x200.jpg
  • team-photo-150x150.jpg

The numbers in the file names are generated automatically, and refer to the exact image sizes – for instance, team-photo-1024x683.jpg is 1024px wide and 683px tall.

These file names should not be changed because WordPress stores these file names in its database and attachment metadata – renaming them directly on the server will usually result in missing images or broken references. If an image needs a better filename for organisational or SEO purposes, it is best to give the original file an appropriate name before uploading it to WordPress.

Why does this happen?

The main reason is performance.

While it takes up more space on the server, it makes it much easier on a website’s visitors.

In a surprisingly common scenario: imagine a photograph, 4000 pixels wide and 5 MB in size, is uploaded and applied as an article’s featured image.

On the blog page, that article’s snippet is usually shown in a grid, and the image may only be rendered at 300px wide. But when viewing the article itself, it might be shown in the banner at 1000px wide.

If the original file was used in either instance, the visitor would be downloading far more data than necessary. While browsers can visually resize images, the full image must first be downloaded before it can be seen.

So instead, WordPress allows us to select a smaller version that it generated during the upload process.

Modern versions of WordPress also utilises a property called srcset which includes all image size references, so the browser can choose an appropriate image depending on screen size.

Where are the images stored?

By default, WordPress uploads media files to a directory: /wp-content/uploads/

There are then two common ways WordPress can organise the files.

The default option is to organise uploads into folders based on the year and month they were uploaded.

For example: /wp-content/uploads/2026/09/team-photo.jpg

This is controlled under Settings → Media → Organise my uploads into month- and year-based folders

When enabled, WordPress automatically creates the appropriate folders.

When disabled, uploads can instead be stored directly inside the uploads folder.

For example: /wp-content/uploads/team-photo.jpg

Neither approach inherently changes the quality of the images, but if your website requires a lot of media files (that is, more than 5 – 10,000 individual images) then it is usually worth keeping them organised by year / month because web servers can sometimes run into issues when there are tens of thousands of files in a single folder.

Can the uploads directory be changed?

Yes, developers can change where uploaded media is stored.

For example, a website could be configured so its image URLs resemble: example.com/media/team-photo.jpg

This can create cleaner and more understandable media URLs.

Changing this should only be done when a website is being developed rather than changed casually on an established website, because existing media URLs, database references, backups, caching and other systems may depend on the current directory structure.

For established websites, changing the upload location normally requires a proper migration rather than simply changing the setting.

How do I rename images in WordPress?

By default, you cannot do that.

There are plugins which provide that capability, but I do not recommend it because your images have likely been attached to various articles and those need to be migrated to the new image reference URL or they will be broken.

Name your image files appropriately before uploading them 5.

One image in the media library references many files

One of the most important things to understand is that the WordPress media library represents attachments, rather than showing every physical image file stored on the server.

You might see one photograph in the Media Library, while WordPress is actually storing:

  • the original uploaded image
  • a scaled version
  • a thumbnail
  • a medium version
  • a large version
  • additional sizes created by the theme
  • additional sizes created by plugins

This is normal behaviour that allows WordPress to choose images that better suit the part of the website where they are being displayed.

So if you look through a WordPress uploads folder and find what appears to be five, ten or even more copies of the same photograph, it doesn’t necessarily mean something has gone wrong. This is WordPress doing what it was designed to do: creating different versions of an image so the website can use the right file for the job.

What happens when an image is edited?

Once an image has been uploaded, we can view it in the media library and click the Edit Image button to modify it – the core operations are resize, crop, rotation and flip.

Resizing an image

This changes the dimensions of an image while keeping the same aspect ratio.

As mentioned, WordPress automatically performs this kind of resizing when it creates the different image sizes generated during upload. This can also be done manually through the image editing tools.

However, reducing an image’s size generally also reduces its file size, which can improve page load performance when the larger dimensions are not required.

Cropping an image

This removes part of an image.

For example, you could have a 1200×800 image cropped to an 800×800 square by removing either the left and right sides, or just one of the sides (or any arbitrary space within). You also could crop the tops and bottoms to turn it into 1200×600, to make it wider.

Commonly used when images need to fit particular aspect ratios, such as:

  • Square thumbnails
  • Portrait profile photos
  • Landscape article cards
  • Fixed-ratio banner images

By comparison, a normal resize retains the specified dimensions without removing any part of the image.

Rotating an image

This changes the orientation of an image in 90° incremenents.

This is useful when a photo has been uploaded as a portrait image but should have been landscape, or vice versa.

Unlike resizing, rotating does not reduce the image’s dimensions. Instead, the width and height effectively swap places.

Images cannot be rotated by arbitrary amounts – for that you will need to use a dedicated image editor.

Flipping an image

An image can be flipped horizontally or vertically, which inverts it – like a mirror.

This is useful when an image would be better shown facing the other way.

Image dimensions stay exactly the same – it’s the exact same image, just flipped.

How changes affect the underlying image files

When a media file is edited, it creates a new set of files on the server which are given new identity to differentiate them from their source files – which are retained in case someone wants to revert the image back to its original state.

For example, team-photo.jpg might create team-photo-e1678416787907.jpg which is derived from the current time, plus some randomness to help keep the filename unique. This same identity is applied to all resized images too, so there will also be a team-photo-e1678416787907-300x200.jpg alongside the rest of the sizes.

Important things to remember when uploading images

Now you know all about how images are processed in WordPress websites, here’s a list of things to remember before uploading your next image:

  • WordPress will automatically create multiple smaller sizes on every upload
    • These sizes are defined within the media settings page, and can be extended by installed theme or plugin code
  • Try to make sure the image is larger than your defined Large image size
    • Not too big though, unless you have plenty of space to spare on your web server
  • Make sure the image’s file name is appropriate before uploading because you can’t change it once it’s uploaded
  • Editing images creates new files – but you can revert it back to what it was within the image editor UI

Happy uploading!

  1. This is not true if you have a plugin that supports SVG files, which are images that cannot get resized – if you’re not sure what that is, read the practical guide to image formats ↩︎
  2. This uses the add_image_size filter: developer.wordpress.org/reference/functions/add_image_size/ ↩︎
  3. For example: office-photo.jpg becomes office-photo-scaled.jpg ↩︎
  4. This uses the big_image_size_threshold filter, which can be disabled by setting it to either 0 or false, or a specific number: developer.wordpress.org/reference/hooks/big_image_size_threshold/ ↩︎
  5. For some assistance on this process, please read the section on Accurate file names for images ↩︎