WordPress 5.3 introduced image scaling for images over 2560px. Now WordPress automatically scales large images to speed up your site. When you upload a large image to WordPress, the file will likely end in "-scaled.jpg", "-scaled.png", etc. For example, an image uploaded at 4800px by 3600px will be scaled to 2560px by 1920px. This is great for most sites, especially for users who upload large files and may not realize their size. Since most site visitors won't need to view large image files, setting WordPress to maximum improves performance.
If you don't like this feature and want to disable WordPress's automatic large image scaling, add the following PHP code to your theme's functions.php file:
// Disable automatic image scaling feature of WordPress
add_filter( 'big_image_size_threshold', '__return_false' );
Note: After you add the above snippet to your site, large images will no longer be scaled down. Please keep in mind that this will have no effect on previous uploads.
However, if you do not want to disable the large image scaling feature of WordPress but want to increase the size of the image scaling threshold, then you can use the below snippet instead of the above snippet.
// increase the image size threshold to 4200px
function themesdna_big_image_size_threshold( $threshold ) {
return 4200; // new threshold
}
add_filter('big_image_size_threshold', 'themesdna_big_image_size_threshold', 999, 1);
Note: Above code will increase the image size threshold to "4200px". You can change "4200" value to any value you like.