How to Find and Fix a Broken Image in WordPress
One mustn’t underestimate the important role of visuals in business and digital marketing. Images in particular have the power to inspire, engage, convey a message, and ultimately, get people to stay on your site and explore it further. But images are not only good for brand engagement – they’re an important website ranking factor, too. So, it’s needless to say that if you have a single broken image on one of your pages, this is not good news for the overall reputation of your site.
To prevent running into such issues, we’ve decided to talk about a few ways in which you can find and fix broken images on your WordPress site. We will also explain what a broken image is and discuss why it’s so important to fix this problem, so make sure to keep reading:
Simply put, a broken image represents a link that leads to an image that is no longer available, for one reason or the other. Usually, what people see when they click on this broken image link is a 404 error and/or a generally recognized broken image symbol.
As we’ve already suggested in the beginning, images play a crucial role when it comes to enhancing the overall user experience and engagement on your site. Namely, when a user expects to find an image on your site and gets a broken image instead, they will definitely be put off by the experience. Also, depending on the overall purpose of your images and the type of website you own (for example, if you have an image-based portfolio site or an eCommerce platform that also relies on various product images), they may even end up abandoning your site altogether, which can only have a bad reflection on your sales and conversions. Therefore, having broken images can negatively impact people’s trust and, naturally, damage your website’s credibility as a whole.
Not only do users dislike websites with broken images, but the same can be said for search engines as well. In case a Googlebot finds too many broken image links, it may label such a website as unreliable, and websites like these generally tend to score a lower ranking in SERPs.
In any case, your website failing to load images is a serious issue that needs to be identified and fixed – and we are going to show you how to do that in a minute.
There are various tools you can use for the detection of broken images on your WordPress site. For example, a plugin such as Broken Link Checker is one such tool. After installing this plugin, you can check for all dead or broken links on any page of your site, including the links of broken images.
While the free version of the plugin allows you to detect issues with a manual scan, there is also the premium version available with more advanced features. If you upgrade to premium, you can make use of the ability to perform a so-called deep scan of your site. You will even get the option to fix and edit the broken link in question.
After installing and activating the plugin, go to the Broken Link Checker page (the link with the same name is available in your admin dashboard) and choose the Broken Link Scan tab. Then, click on Start New Scan.
The plugin will instantly start scanning for any broken links on your site, displaying the progress bar and notifying you of the total number of posts and pages found, the number of scanned links so far, and the number of broken links, among other data. In other words, you can see the reports even while the scan is still in progress. All in all, the link scanning process itself should take a few minutes.
Once the scan is finished, you will be able to access the broken link page and see what you can do to fix it.
Now, before we tell you what you can do to fix broken images, we are going to list some of the reasons why this issue can occur in the first place. Here are some of the possible causes of having a broken image on your site:
-
Incorrect path to the location of the image file
-
Damaged image file
-
Wrong image format (for example, the image file type is .jpg but it’s identified as .png in the code of the image)
-
Changes in the image name
-
Files that are removed from the server (in cases of site migration, for example).
There are a few different approaches you can take to counter the issue of broken images on your WordPress site. For example, you can simply delete the faulty images altogether or try to rename and/or restore them. We suggest that you try restoring your images only if your website or business is dependent on quality images so it’s important for all your visuals to always be displayed properly.
First things first, when you register a broken image on your site, you should find, or rather, define its path. This can be done easily by using your browser’s inspect element tool. Simply hover over the broken image and right-click on it. Then, choose Inspect.
The URL that shows up in the inspect tool should be the location of your image. You should copy this location and paste it into the text editor of your choice.
Once you’re aware of your image location and its name, you should see if your picture is still present at said location. You can do this using your cPanel (or FTP) and going to the directory you’ve found in your Inspect.
For more information on how to find and access your images, we highly recommend that you check out our comprehensive article that talks about where WordPress stores images on your site.
If your image isn’t where it’s supposed to be, you can try and place it there once again, or rename your image tag so that it matches its proper location.
In case the path of the image file in your WordPress directory contains the same URL as the one in your browser and you still have the issue, then there’s a high chance that your image file is damaged. We suggest that you check whether your image shows up on your browser or your local computer. If not, you should reupload the image to your site.
Finally, if all else fails, you can try and roll back to the previously backed up version of your site and see if that fixes a broken image issue.
Conclusion
By ensuring that your website is devoid of broken images, you can only maintain your website’s reputation, improve user engagement, and positively influence your website’s rankings in SERPs. There are tools you can use to detect broken images quickly and with ease. A plugin like Broken Link Checker looks for all broken links on your site including broken image links. While the free version of the plugin is enough to detect a broken image link, if you upgrade to the premium version of the plugin, you also get the option to edit and fix the link in question. If you decide to try and fix the issue of a broken image on your own, you first need to find the cause of the problem, like whether it’s due to a damaged file, incorrect file path, or something else entirely. Then, you can proceed to troubleshoot and fix the problem accordingly – either by restoring, replacing, or deleting your image altogether.