Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/devcollaborative/limit-image-filesize/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A WordPress plugin that limits uploaded images to 5MB filesize
Description
This plugin checks the upload file type and if it's an image, rejects it if it's larger than 5MB. Documents and other non-image media larger than 5MB are allowed.
The plugin also adds text to the message on the Media Gallery upload screen "Maximum upload file size: 100 MB. Image uploads restricted to 5 MB."
This plugin works both on the Media Library upload page and if the user uploads an image directly to a block.
The 5MB size is hardcoded.