Is there a way to limit the size of the file that can be uploaded to the Media Library?

In the past I've had clients uploading huge jpg files right out of their cameras to the Media Library to use in Posts and Pages. They used up a lot of server space and I had to go in and use the Insanity plugin to reduce image sizes to regain server storage.

I'm setting up a site for another client who is not that savvy and I'm looking to be more proactive with this install to prevent the same thing from happening.

I know it's possible to increase the upload size by changing the php.ini file, or through other methods. I'm assuming you could decrease the upload limit the same way.

The issue I'm having is, I want to limit the upload size to the Media Library, but not limit it for themes and plugins. After searching I've found a few plugins that seemed like they would work but they were old and no longer supported.

Along the same line, I'd also like to know if there is a way to limit the amount of storage space they can use on the server without setting a limit in the server control panel. I'm using WP Engine for client sites, and to the best of my knowledge there isn't a way to limit storage based on install, just the entire account.

Any input would be appreciated.

Thanks,
Trevor

  • Bojan Radonic

    Hey @Trevor,

    Hope you're well today :slight_smile:

    I'm not aware of that to be possible. I've also tried searching for solution but didn't have any luck there as well, there are standard max file upload size limits you're probably aware of and multiple ways of adding them (php.ini, .htaccess etc) but all of these are limiting all files that could be uploaded to the site including themes and plugins.

    With the limit set you can still upload files via FTP for themes/plugins but as you said your client is not tech savvy I guess this couldn't work too.

    The best thing I could suggest would be to use our image compression plugin that compresses images on upload, you can find the plugin here.

    Hope this helps :slight_smile:

    Cheers,
    Bojan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.