How to restrict uploaded image size in WordPress

Published 24 Mar 2015 in Clients, Plugins, WordPress by ZigPress

Want to know one of the worst things about administering a WordPress-based website?

The media library.

Specifically: allocating enough hosting space, backing it up, restoring it, and moving it between hosts if the site is being moved.

The more images your authors add to the library, the the bigger it gets. And WordPress doesn’t exactly help. Firstly it has auto image resizing facilities, and secondly the file size limit for each uploaded image is at least 2Mb and may be as high as 10Mb or more depending on the server the site is running on.

These facts mean that WordPress authors have absolutely no incentive to resize images before uploading, meaning that a frequently-updated WordPress site probably has hundreds of photo files, uploaded directly from a camera or phone, taking up many megabytes or even gigabytes of space, when they are never displayed at full size on the website.

Wouldn’t it be better to persuade website authors to shrink photos to a reasonable size before uploading? I think it would. 1Mb is plenty big enough for a 1024×768 JPG which will probably still only be shown at reduced sizes. You could even try 0.5Mb and see how many complaints you get from authors.

Happily, there is a plugin that will allow you to set a maximum image upload file size, without affecting other uploads (movies, PDFs, etc). It’s called WP Image Size Limit (click for the repository link).

If you have a WordPress site with many authors and an unmanageably huge media library, install this. It won’t shrink your existing library, but it will stop it getting bigger so quickly.

Incidentally, if you prefer to take the approach of restricting image dimensions rather than file size, there’s a plugin for that too: Imsanity (love the name). I have tried this one myself and it works very well. Imsanity will not only reduce new uploads to specified dimensions, but it will go through your existing library and shrink large images as well, if you ask it to.


  1. On 06 Apr 2015 at 00:21, Rahul said:

    Even i used to face problems with media library. There are too many pictures that i used to get tired just by looking it. However, I had tested Imsanity and it’s just awesome. But, did not try WP Image Size Limit. I will try it soon. Thanks for this post :)

  2. On 28 May 2015 at 12:00, zara said:

    very good tips on restricting uploaded image size on wordpress. Even I didnt know before thanks for sharing with us. Thumbs up

  3. On 10 Jan 2016 at 15:45, Ekramul Haque said:

    Great post. Very good tips.

  4. On 02 Feb 2016 at 18:25, Chris said:

    Any comment on the fact this plugin hasn’t been altered in two years?

  5. On 13 Jun 2016 at 13:48, Bhagwad Park said:

    Another option is to restrict the image upload size programmatically instead of using a plugin. For example, see this tutorial:

    This way, you don’t have to slow down your site with yet another plugin!

Add a Comment

If you have used this form and would like a copy of the information held about you on this website, or would like the information deleted, please email [email protected].