If you are having issues uploading photos, there can be a number of factors, but the most common issue is Not enough memory allocated to PHP to process large photo files or post max size or upload max size are too low.
The file size of the photos you are uploading and the dimensions of the file both play a factor when it comes to processing the photo on the server. If the file size or dimensions are too large, there may not be enough memory allocated to the PHP to process the file.
If you try to upload or process photos and nothing shows , get a fatal error, a 500 internal server error, or an error related to allocating memory, this is probably the reason why.
Check current related PHP settings
Sytist attempts to set the main PHP settings needed for uploading photos to:
- Upload Max File Size: 30M
- POST Max Size: 30M
- Memory Limit: 512M
While in the upload dialog window, click the "view server configurations" link. If upload max file size or post max size are showing lower than above, and the file size of the photo you are uploading is higher, then those photos won't upload.
And if the Memory Limit is lower than 512M then it could be no enough memory allocated to process the files.
If your settings don't match the above settings then your hosting company probably has a hard limit set on those. You may want to contact your hosting company and see if they can increase these PHP values for you in the php.ini file .
403 or I/O Error only on certain images
A 403 or I/O error is usually generated by Mod Security on the server. So there is something about those images that is triggering Mod Security or some other security on the server, possibly in the meta data in the photos..
Re-exporting or re-saving those image might fix the problem.
You may also want to contact your hosting company and let them know you are getting that error and if they can make an exception for the Mod Security rule it is triggering