Sometimes a user would suddenly notice that all the images from their site are gone and are showing broken image placeholders. When the user tries to upload an image to a post using the media uploader, it results into an error.
Change File Permissions to Fix the Image Upload Issue
Access your site’s files, and open your site’s root directory, typically called public_html. Open the wp-content folder. This is where the Uploads folder is located. The Uploads folder contains additional folders that store your media files when you upload them to your site.
Right-click the Uploads folder, and select File Permissions. Make note of the numeric value that’s already there.
In the Change File Attributes window, change these settings:
- Numeric Value: 744
- Recurse into Subdirectories: Tick.
- Select the Apply to Directories Only radio button.
Increase Your Site’s Memory Limit
Follow these instrutions to increase yor site memory limit.
Deactivate All of Your Plugins
If you use a plugin to optimize your images, try deactivating it before uploading images to see if that fixes the image upload issue for you. Try deactivating all of your plugins if not. If your site has grown quite a bit and uses a lot of plugins, you may be reaching its memory limits, which may prevent you from uploading media files.
Rename Your file
If you’re experiencing this issue with one image, your solution may be easier than the previous solutions. Try renaming the file on your computer prior to uploading it to WordPress to start out with. Make sure there are no apostrophes in your file names as this tends to cause this error to appear.