Prompt
My CMS is uploading oversized images, how do I stop that?
Latest observation
Nov 2, 2026
OpenAI APIWeb search: off
To stop a CMS from uploading oversized images, you usually need to enforce file size and dimension limits in a few places:
1) Set upload limits in the CMS
Look for settings like:
- Maximum file size
- Maximum image dimensions
- Allowed image types
Examples:
- WordPress: media upload limits may be controlled by server config and plugins.
- Drupal/Joomla/other CMSs: often have media field settings or upload validators.
2) Add server-side limits
Even if the CMS has limits, enforce them at the server too:
- PHP:
upload_max_filesizepost_max_sizememory_limit
- Nginx/Apache:
- request body/upload size limits
3) Resize/compress images on upload
If you want to allow uploads but reduce size automatically:
- Generate resized versions
- Compress images before saving
- Strip metadata if appropriate
This is often the best user experience.
4) Reject images that exceed dimensions
In addition to file size, block images that are too large in:
- Width
- Height
- Megapixels
Example rules:
- Max file size: 5 MB
- Max width/height: 3000 px
- Max megapixels: 12 MP
5) Add validation in your upload handler
If you control the code, validate before accepting the file:
- Check MIME type
- Check actual image dimensions
- Check file size
- Reject if over limit
6) Add frontend warnings, but don’t rely on them alone
You can warn users in the browser before upload, but always enforce limits on the server too.
If you want, tell me which CMS you’re using and I can give you the exact setting or code to block oversized images.