WordPress 5.3 Improves Large Image Handling

WordPress 5.3 Beta 3 was released this week and RC 1 is right around the corner, expected October 15. Core contributors have been publishing developer notes on new features landing in this release. One exciting enhancement that hasn’t received much attention yet is WordPress’ updated handling of large images.

Many WordPress users don’t consider the size of the images they are uploading to their sites, and modern smartphones are capable of producing very high quality images at very large file sizes. WordPress 5.3 will automatically detect large images (with a default threshold of 2560px) and generate a “web-optimized maximum size.” The threshold is used as the max-height and max-width value to scale down the image for use as the largest available size. A new big_image_size_threshold filter is available for developers who want to change the threshold size or disable the new feature altogether.

WordPress will store the original image size so that it is still accessible and a new function is available for fetching its path: wp_get_original_image_path(). It is also used to generate all the image sub-sizes.

More than two million WordPress users rely on plugins like Imsanity, Smushit, and EWWW Image Optimizer to optimize images. They often include additional features for bulk resizing previously uploaded images. WordPress’ new large image handling should not interfere with image optimization plugins, because it doesn’t affect the default settings that they often hook into and use to perform additional optimizations. The new core enhancement may be suitable to replace these plugins for some users who only require the bare minimum optimization on upload.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.


  1. So .. this “improvement” is only based on the dimensions of an image, not its actual size (eg. JPEG quality)?

    Then its no real help at all. If it was actually about FILE SIZE detection, now THAT would be an actual improvement, and we’d all be instantly happy campers 😉

    cu, w0lf.



    1. This is a move in the right direction.

      The only I have a high limit is is to accommodate videos and large PDFs.

      I’d love it if we could be more granular on max file sizes based on file type.



      1. The new feature is based on the dimensions of the uploaded image, not the file size, so videos and PDFs are unaffected.

        Of course, if someone DID need to be more granular for other image types, it’s filterable (big_image_size_threshold), so the feature is infinitely configurable.

        Naturally, reducing the dimensions of an image also tends to reduce the filesize (sometimes drastically), which is a big improvement, regardless of what the wolf thinks 😉


    2. This has more to do with the fact that the img srcset in WordPress feature was limited to a max image size of 1600px, so for Retina and hi resolution screens, often times the browser would automatically pull the unoptimized Original image if it needed something with higher resolution. And since most themes don’t create anything larger than the “Large” size which is 1024 (I think), huge Original images were loaded instead.

      Implementing this fix means that there are additional thumbnails at larger sizes that can be pulled by the browser, and NOT include the Original.

      Believe me, as a photographer, and a developer that works primarily with photographers, this is a feature I realized was necessary shortly after 4.4 came out. If you look in TRAC, I was raising this concern 2+ years ago.

      This is a much needed fix, and I appreciate that Morten, and the Media team are getting this incorporated.



  2. Good one, but I’m still looking for the option in the editor to have nofollow attribute for the link. Already asked but got a negative response.

    Right now I need to manually install another plugin to do the job.



  3. While this has nothing to do with size….how about an option to limit the # of images/sizes that are created? I’ve run into plugins and or themes that create their own sizes, and a lot of them don’t show up in the media library area. Then every time an image is uploaded, 10 different sizes are created and in many cases a set of duplicates of the same size.



Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.