How to Troubleshoot & Fix WordPress Image Errors

In this post learn about how to troubleshoot & fix WordPress image issues. There may be multiple reasons why images don’t display properly on WordPress websites. Here are the various scenarios and applicable instructions to troubleshoot the images issues with WordPress sites

1. Fix image thumbnails not displaying

There can be issues, after configuration changes, when WordPress isn’t able to display the thumbnails of previously uploaded images. You can use the Regenerate Thumbnails plugin to fix this issue.

  1. Install & Activate the plugin in WordPress.
  2. If you want to regenerate all of the thumbnails for your site:
    1. Under the Tools menu, click on Regen. Thumbnails
    2. Click on the Regenerate All Thumbnails button.
  3. If you want to update individual image thumbnails:
    1. Click on Media from the WordPress navigation bar.
    2. If you are in the Grid view, you will need to click the List view in your Media Library.
    3. Locate the image and hover over it so you can click on the Regenerate Thumbnails link.

The steps above will leave you at a page that shows the success of regenerating the images.

2. Fix duplicate featured images in WordPress

When configured incorrectly, WordPress can have duplicated featured images in your posts or pages. You can use the steps below to fix duplicated featured images.

  1. Click on Pages or Posts depending which you need to edit.
  2. Click the edit under the Page or Post title.
  3. Click on the image in the text box.
  4. Click the Remove button to remove the image.
  5. Click the Update button to publish your changes.
  6. Review your page or post to verify that the duplicate featured image has been removed.

3. Fix an image that links to itself in WordPress

When configured incorrectly, WordPress can make your images on your page or post link to the image itself. This can cause a poor user experience if the user clicks on the image and leaves the page or if a search engine ends up linking to the image instead of your post. You can use these steps to fix this issue.

  1. Click on Pages or Posts depending which you need to edit.
  2. Click the edit under the page or post title.
  3. Click on the image in the text box.
  4. Click the Edit button to edit the image.
  5. Click the drop-down menu for Link To and select None.
  6. Click the Update button to save your changes to the image.
  7. Click the Update button to publish your changes to the page or post.
  8. Review your page or post to verify that the duplicate featured image has been removed.

4. Fix mixed content errors in WordPress

After adding an SSL and enabling HTTPS, you may find that some images do not display properly anymore. If you have recently added an SSL, follow one of these sets of directions to fix your issue.

Using a plugin

Follow these steps to install the Really Simple SSL plugin.

  1. Install & Activate the plugin in WordPress.
  2. Under Settings select SSL.
  3. Providing your SSL is active, you can click the Go ahead, activate SSL! button.
  4. Review your site to verify that your images display properly.

Note: This WordPress plugin is a third party plugin, please review the developer’s page for issues with it’s usage.

Using the .htaccess or web.config file

  1. Connect to your hosting using FTP.
  2. Redirect HTTP to HTTPS automatically from cPanel Redirect option.
  3. After setting up the HTTPS redirect, review your site to verify that your images display properly.

5. Troubleshoot and fix missing WordPress images

When all or some of your images are no longer visible, you have a permissions problem with those files or folders. You can use the steps below to diagnose and fix permission problems.

Checking for permissions issues

  1. You can test to see if an image has permissions problems or is missing by going to the URL of the image in your browser. Example: http://example.com/wp-content/uploads/2020/04/Capture.png
  2. If you get an error trying to get to the image, it is either missing or has incorrect permissions.
  3. Before checking permissions, it’s best to verify the file exists first. You can find the URL to an image from within the Media Library.
  4. Connect to your hosting using FTP.
  5. You can browse to the /wp-content folders.
  6. Confirm the permissions are correct for the /wp-content directory.
    • 755 for Linux accounts
    • Read and Write for Windows accounts
  7. If the /wp-content folder or the files within do not have read or web visible permissions, they won’t be visible and you’ll need to update them.

Note: If setting permissions didn’t make your images viewable or the image wasn’t present in the folder, you should upload the image again and add it back to the page.

6. Change image dimensions in WordPress

If you have an image that isn’t the desired size, on your page or post, and it must be adjusted.

  1. Click on Pages or Posts depending which you want to edit.
  2. Click the edit under the page or post title.
  3. Click the Add Media button.
  4. Select the image you wish to insert.
  5. Under the Attachment Display Settings on the right, select the desired size from the Size drop-down.
  6. Click the Insert into page button.

You have now updated the size of the image you are working with.

Thanks for visiting. For queries and suggestions, emails are welcome at learnweb@hostingcolumn.com.

Subscribe to Hosting Column for latest updates and posts.