How to Change the Maximum Image Resolution in WordPress and Optimize Your Images

Why it is worth looking at image resolution in WordPress

When you upload images to WordPress, a lot more happens in the background than you might think at first glance. WordPress checks the file, generates several image sizes and automatically limits the maximum resolution. By default, large images are reduced to a maximum image resolution of about 2560 pixels on the longest side.

This is generally a good idea, because extremely large images slow down your site, eat up storage space and hurt performance. At the same time, there are many scenarios where you might want to increase the maximum resolution in WordPress or completely disable the automatic downscaling. Typical examples are photo galleries, portfolios or high resolution product images in an online shop.

In this article I will show you how high the maximum resolution in WordPress is by default, why WordPress scales down images, how you can change the maximum image resolution, what you should keep in mind regarding server performance and PHP, how to define your own image sizes and how to remove unused sizes to save storage space.

How high is the maximum resolution for images in WordPress?

WordPress has a built in limit for large images. If you upload a very large image, it is automatically reduced to a maximum resolution during upload. By default, this limit is around 2560 pixels on the longest edge. If your image is larger, a scaled version is generated and used as the main image.

In addition to this limit for large images, WordPress also creates several other image sizes, for example:

  • Thumbnail
  • Medium size
  • Large size

You can adjust these standard sizes under:

Settings → Media

This does not change the big limit for large images, it only adjusts the classic media sizes.

A quick overview:

Type of limitTypical settingWhere to configure
Maximum image resolutionabout 2560 px (long side)via filter big_image_size_threshold
Standard sizes thumbnail etc.e.g. 150, 300, 1024 pxSettings → Media

Why does WordPress scale down images?

The automatic downscaling has several reasons and all of them have a direct impact on user experience and search engine optimization.

Performance
Large image files slow down your website. The bigger the image, the longer it takes to load. On mobile connections with poor reception, that can be really annoying.

SEO and Core Web Vitals
Slow pages have a harder time ranking at the top in Google and Bing. Images are often the biggest factor. If you keep the maximum image resolution in WordPress under control, you automatically help your rankings.

Storage space
On cheap web hosting packages, storage space is limited. Large original images plus lots of thumbnails per upload fill up the disk much faster than necessary.

Protection against camera originals
Many users upload photos directly from their camera that can easily have 6000 px or more on the long side. WordPress limits the image resolution so these huge files do not end up unoptimized on the frontend.

Even with all these advantages, there are legitimate reasons to adjust the image resolution in WordPress or to raise the limit.

How can you change the maximum resolution in WordPress?

There are several ways to change the maximum image resolution in WordPress:

MethodDifficultyRecommended for
Plugineasybeginners, client websites
functions.php in a child thememediumdevelopers, custom themes
Snippet plugin (Code Snippets etc.)mediumclean, update safe solution

If you are already working with child themes or snippet plugins in your projects, the code based solution gives you the most control. You can adapt it to your needs very easily.

Completely disable the limit for large images

If you want to disable the automatic downscaling entirely, you can use this snippet:

// Completely disable the limit for large images
add_filter( 'big_image_size_threshold', '__return_false' );

As soon as this filter is active, the maximum image resolution is no longer limited. WordPress will then use the original file as the largest version. This can be useful if you intentionally work with very large images, for example for a gallery or for high resolution print files.

Increase the maximum image resolution (for example to 4000px)

Instead of completely disabling the limit, you can simply raise it:

// Change the limit to 4000px
add_filter('big_image_size_threshold', function ( $threshold ) {
    return 4000;
}, 999, 1);

With this filter, images are only scaled down when the longest edge exceeds 4000 pixels. This is a good compromise if you need high quality images but still do not want to pass every camera original through without any restriction.

What should you keep in mind? Server performance, PHP, RAM and execution time

The higher you set the maximum image resolution in WordPress, the more resources your server needs to process images during upload. Especially on small or cheap hosting packages, you should keep a few things in mind.

FactorImportant points
Server performanceShared hosting with little CPU power can hit its limits with many large uploads
PHP versionNewer versions like PHP 8.1 or 8.2 are faster and more efficient
Script memory / RAMThe memory_limit should not be too low, large images need a lot of RAM
Execution timemax_execution_time and max_input_time should be set high enough

Typical symptoms when the environment is too weak:

  • HTTP error when uploading
  • Images are only partly generated
  • Error messages like “Allowed memory size exhausted”
  • Thumbnails are missing or broken

If you use a small hosting package with little RAM and CPU, you should only raise the maximum image resolution in WordPress carefully and ideally resize your images locally to a reasonable size before uploading them.

Control JPEG quality and file size in WordPress

Besides image resolution, JPEG compression is an important factor. With the jpeg_quality filter you can globally control how strong WordPress compresses JPEG files:

// Globally adjust JPEG quality (0 - 100)
add_filter('jpeg_quality', function ($arg) {
    return 88; // good compromise between quality and file size
});

Some simple guidelines:

  • Values around 80 to 90 usually give a good balance between quality and file size
  • 100 means almost no compression – very large files that are rarely useful in practice
  • Changes only apply to new uploads, existing images stay as they are
  • Some image optimization plugins use their own quality settings and override this filter

The combination of a sensible maximum image resolution and a tuned JPEG quality is a powerful way to speed up your WordPress site and reduce storage usage.

Add more image sizes and resolutions in WordPress

If you work with themes or custom layouts, you often need more than just the three default sizes. You might want:

  • a fixed teaser size for blog archives
  • a square size for tiles
  • a special format for sliders or hero images

For this, WordPress offers the add_image_size function.

Example:

// Register additional image sizes
add_image_size('custom-200p', 200, 200, false);
add_image_size('custom-200p-crop', 200, 200, true);

Explanation:

  • custom-200p generates an image with a maximum of 200 x 200 pixels, the aspect ratio is preserved
  • custom-200p-crop forces exactly 200 x 200 pixels, excess parts of the image are cropped

You can then use these image sizes in your theme, for example with the_post_thumbnail('custom-200p') or via the corresponding settings in your page builder.

Important points:

  • Register these sizes in a child theme or via a snippet plugin so they are update safe
  • If you add new image sizes, you should regenerate thumbnails for existing uploads so they also get the new sizes

How can you remove unused images and image sizes to save storage space?

Over time, a huge number of files accumulate in the media library. A single upload can easily create ten or more files. If you later change your theme or adjust image sizes, many of these thumbnails will no longer be used on the frontend but they still sit on your server.

A two step strategy works well here:

  1. Prevent unnecessary image sizes in the future
  2. Clean up existing unused image sizes

1. Disable unnecessary image sizes

Not every automatically generated size is actually used on the frontend. You can disable specific sizes via a filter so they are not created at all during upload. Example:

function my_disable_unused_image_sizes( $sizes ) {
    // Remove sizes you do not need
    unset( $sizes['medium_large'] );
    unset( $sizes['1536x1536'] );
    unset( $sizes['2048x2048'] );
    return $sizes;
}
add_filter( 'intermediate_image_sizes_advanced', 'my_disable_unused_image_sizes' );

Make sure you only remove image sizes that are not required by your theme or by plugins. It is a good idea to test changes in a staging environment first.

2. Clean up existing unused images

For the second step, you can use specialized plugins that:

  • scan all images and their sizes
  • check which files are actually referenced in posts, pages or the database
  • suggest unused thumbnails for deletion

No matter which tool you use, always create a backup first. If you accidentally remove an image that is still used somewhere, you can easily restore it.

Best practices for image optimization in WordPress

To wrap things up, here are some practical tips that have proven to work well in many real world projects:

  • Resize images locally before uploading them instead of pushing huge originals to the server
  • For most blogs, a maximum image resolution of 2000 to 3000 pixels is more than enough
  • Only raise the WordPress maximum image resolution as much as you really need
  • Clearly define which image sizes your theme actually uses and disable the rest
  • Regularly clean up unused image sizes and old thumbnails
  • For very image heavy projects, consider better hosting or a CDN

If you follow these guidelines, you will keep the maximum resolution in WordPress, your image sizes and your storage usage under control and you will not have to worry about a bloated web space or slow loading times caused by oversized images.

Durchschnittliche Bewertung 0 / 5. Bewertungen: 0

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top