Media and Safe SVG File Upload Rules by CodeCaste
Control upload size limits, file types, image resolution, and safe SVG uploads across WordPress.
Not scanned yet
WordPress plugin
Install in
Media and Safe SVG File Upload Rules by CodeCaste lets you decide which files can be uploaded to your site and how big they can be. You set the rules once, and they are applied everywhere files can come in.
What you can do
- Set one size limit for all files. For example, nothing larger than 5 MB.
- Give a file type its own limit. For example, 2 MB for PNG, 50 MB for MP4 and 10 MB for PDF.
- Limit image resolution. Pick a preset such as HD, Full HD, QHD or 4K from a dropdown, or choose Custom to enter your own width and height. For example, no PNG larger than 1920 x 1080 px.
- Block a file type completely. Any file with that extension is refused, whatever its size.
- Allow SVG files safely. WordPress blocks SVG by default because SVG files can hide harmful code. Turn SVG on and the plugin cleans every SVG before it is saved.
- Clear error messages. When a file is refused, the person uploading sees the reason, such as the file being too large, too high-resolution, or its type being blocked.
Where the rules apply
Rules cover the Media Library, the block editor, REST API uploads and files WordPress downloads from a URL (sideloading). Uploading a plugin or theme ZIP is not affected.
Written by Joobi from the project's own listing. See the source page
25 Nov 2026
Version 1.0.2 released. Not scanned yet.
1.0.2
- Added optional maximum image resolution per file type (presets or custom width/height).
- Media Library uploads now show the real rejection reason instead of a generic server error.
- Clearer file-size rejection messages.
1.0.1
- Renamed plugin to “Media and Safe SVG File Upload Rules by CodeCaste” for consistent branding across CodeCaste plugins.
1.0.0
- First release.
- Default size limit for all files, plus per-file-type limits and blocking.
- Safe SVG uploads with automatic cleaning (off by default).
- Rules apply to the Media Library, REST API and sideloaded files.
3 Nov 2026Listed on Joobi from WordPress.org.
Follow this listing's changes (Atom feed)