How to handle an image upload size limit
If the error says the file exceeds the upload limit, compare the file size with the limit shown on the WordPress media-upload screen. That limit is set by your hosting environment.
Confirm the actual error
Section titled “Confirm the actual error”Record the error message and the file’s format, size, and pixel dimensions. An upload-limit error is different from a generic HTTP error, unsupported format, permission problem, or image-processing failure.
Try a small JPEG you know is valid. If that also fails, shrinking the original photo may not address the cause. Ask your host to investigate the exact failure rather than changing server permissions at random.
Reduce or review the limit
Section titled “Reduce or review the limit”- Keep the original photo and work on a copy.
- Reduce dimensions to suit its intended display and compress the copy while checking visual quality. See optimizing one image.
- Upload that single copy through Media → Add New. Compare its size with the displayed limit before trying again.
- If the necessary file still exceeds the limit, ask your host which upload restriction applies and whether it can be adjusted for your plan.
Avoid copying PHP or server-configuration snippets into the site without knowing which server layer enforces the limit. A restriction may exist outside WordPress, so a change inside the theme is not a reliable solution.
Check the result
Section titled “Check the result”Confirm the new image appears in the Media Library, can be opened, and displays correctly after being inserted into the page. A completed progress bar alone does not tell you whether the resulting image meets your needs.
If the same error persists, give support the exact message, file size, and result of the small-file test. Do not repeatedly upload the entire library while diagnosing one failing file.