When you upload a large image to WordPress, it automatically creates a smaller version of it (usually around 2560px wide). This feature helps improve performance—but sometimes, you might need to keep your original high-resolution image untouched.

🧩 The Code Snippet

Copy and paste the following snippet into your theme’s functions.php file or (recommended) use the Code Snippets plugin to keep it organized and safe.

				
					add_filter( 'big_image_size_threshold', '__return_false' );
				
			

That’s it. This single line tells WordPress to skip the image scaling process entirely.

How It Works

WordPress introduced the big_image_size_threshold filter in version 5.3.
By default, when you upload an image larger than 2560px in width or height, WordPress generates a scaled-down copy.

 

But when you return false using this filter, you’re basically saying:

   “Don’t touch my image—keep it exactly as I uploaded it.”

How to Add This Code

You can easily add this snippet using the Code Snippets plugin

  1. Go to your WordPress dashboard → Plugins → Add New.
  2. Search for “Code Snippets” and install it.
  3. Click Add New Snippet.
  4. Paste the code above into the editor.
  5. Save and activate the snippet.

 

Once activated, your future uploads will stay in their original size.

Why You Might Want This

  • You work with high-quality visual content and want to preserve every detail.
  • You’re using a CDN or compression tool to handle optimization separately.
  • You don’t want WordPress to generate unnecessary image sizes.

A Small Note

Disabling image downscaling means your uploads will keep their original dimensions.
This can slightly increase storage usage and affect load times if not optimized properly.
So, it’s best to use this when you really need full-resolution images.