WP Manifestindependent plugin directory
manifest / media / twgp-media-upload-restrictions

TWGP Media Upload Restrictions

Restrict media uploads based on size, resolution, and allowed formats

★ 0stars

Install

Download source zip No release zip yet

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/deepanker70/twgp-media-upload-restrictions/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Restrict media uploads based on file size, image resolution, and allowed formats. A simple and lightweight plugin to enhance WordPress media upload security.

Description

TWGP Media Upload Restrictions helps you control media uploads on your WordPress site by enforcing restrictions on:

✅ Maximum file size (in KB)
✅ Maximum image resolution (width & height in px)
✅ Allowed file formats (e.g., jpg, png, pdf)

🛠 Key Features:

  • Easily configure settings via Media > Upload Restrictions.
  • Blocks uploads that exceed size, resolution, or format limits.
  • Displays error messages when users upload restricted files.
  • Secure input validation and nonce protection.
  • Fully optimized for WordPress best practices.

Installation

  1. Download and extract the twgp-media-upload-restrictions.zip file.
  2. Upload the twgp-media-upload-restrictions folder to /wp-content/plugins/.
  3. Activate the plugin through the Plugins menu in WordPress.
  4. Go to Media > Upload Restrictions to configure settings.

Frequently Asked Questions

What happens if an uploaded file exceeds the limits?

The file will not be uploaded, and an error message will display the restriction that was violated.

Can I allow specific file formats?

Yes! You can set allowed formats in the plugin settings (e.g., jpg, png, gif, pdf).

Does this plugin work with all WordPress themes?

Yes, it works with any WordPress theme as it only modifies media upload behavior.

Does this plugin support translation?

Yes, it is translation-ready using WordPress localization functions.

Changelog

1.0

  • Initial release with file size, resolution, and format restrictions.
  • Added nonce security for settings.
  • Fully tested on WordPress 6.5.

Upgrade Notice

1.0

  • First release with essential upload restrictions and security measures.

Screenshots

  1. Settings Page: Configure max file size, resolution, and allowed formats.
  2. Error Message Example: Uploading a restricted file triggers an error message.

Support

For support or feature requests, visit: https://thewpguides.com