-
Notifications
You must be signed in to change notification settings - Fork 0
Restrict media uploads based on size, resolution, and allowed formats
deepanker70/twgp-media-upload-restrictions
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
=== TWGP Media Upload Restrictions === Contributors: Deepanker Author: Deepanker Author URI: https://thewpguides.com Tags: media, upload restrictions, file size limit, image resolution, file format restriction Requires at least: 5.0 Tested up to: 6.7 Requires PHP: 7.4 Stable tag: 1.0 License: GPL2 License URI: https://www.gnu.org/licenses/gpl-2.0.html 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](https://thewpguides.com)
About
Restrict media uploads based on size, resolution, and allowed formats
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published