WordPress “Image Cannot Be Loaded” Error
I recently came across a site that threw me for a loop – in it, I was able to create products and add images just fine, but I was receiving a strange error – when I clicked on the product image or any gallery image, I was given an error stating:
Image cannot be loaded. Make sure the path is correct and image exist.
I then noticed in the product backend, something wasn’t quite right as the product image was missing, although when I went to edit the image I could select it as expected:
So, upon inspecting the image path, I was given a website owner’s worst nightmare – a dreaded server error!
The Fix
After some digging, I found this was due to a bad .htaccess
file. If you’re encountering the same error, then open your site in your FTP editor of choice, like Cyberduck. Then, follow these steps:
- Disable all plugins (except for WooCommerce) and switch to a default theme. The theme shouldn’t matter as much, but likely performance plugins or security plugins could be causing an issue.
- Locate the
.htaccess
file, which should be in the root folder of your WordPress installation. - Rename it to
.htaccess-old
. We’re renaming it so we can always revert back, instead of deleting. - You should now be able to add images and have them work normally – slowly enable plugins and test to see if you can find the source of the problem.
What the “500 – Internal server error” page typically means on a WordPress installation is that .htaccess
is redirecting the browser to something that doesn’t exist or isn’t accessible – by resetting the .htaccess
file, we’re hopefully removing the trouble change. If this doesn’t work, then it’s good to check where images are saving on your site and make sure access privileges are enabled to view, which is something your host can help you with.
Let me know if you’ve had this error, the above doesn’t work, or had a different solution!
Have any questions or comments about this article, or ways you think it can be improved?
Join the conversation in the comments below, or sign up for my newsletter to recieve periodic updates!
No comments yet.