How WordPress Post Images Can Hurt Your SEO

What happens when someone clicks on an image you have uploaded and inserted into a post or page on your WordPress site?  If you are like most people one of three things happens.

  1. The image may appear in a lightbox, with a gray background.
  2. The image may appear in its own page with a white background.
  3. The image may appear alone on a page with your header or footer.

This is all controlled from the insert media dialogue box when you insert your image.



If any of these three things occur, the link connected with the image is not leading to true content.  This is a problem for your SEO.

How Do WordPress Post Images Affect Your SEO?

The problem is, the link for the image is leading to either the file location of the image itself or to an attachment page and because these are considered thin content by search engine they may be hurting your SEO!  As Neil Matthews points out:

…Google can also index these pages and add hundreds of very low quality pages into the index for your site.

If you add 1-2 images per post that is an additional 100-200% of pages that are classed as thin content by Google.

On these pages you will see  a single image, a few lines of title text and that is all, if Google sees your site stuffed with thin content pages it will assume your site is of low quality and apply a penalty.

Google considers the following thin content:

  • Automatically generated content
  • Thin affiliate pages
  • Content from other sources. For example: Scraped content or low-quality guest blog posts
  • Doorway pages

The first item, which I bolded, is what we need to worry about.

How Do I Fix this Problem?

When you add an image to a post or page you can choose where clicks on the image goes – you can even remove the link altogether.  In the image below you can see where the options for this are.


I’d suggest choosing the “None” option for most images.  If I’m including a logo for a company in an article I will make the link go to the company’s website.  As this involves manually changing the option every time you insert an image this solution is fine for images going forward, but what if you forget?  Or what about the images already in posts on your site?   There are two solutions to the WordPress post image problem.

Change the WordPress Post Image Default

For everything going forward I prefer to change the default to none.  Type yourdomain & wordpress folder/wp-admin/options.php in your browser bar, scroll down to image_default_link_type and change the box to say none.  Scroll all the way to the bottom to save and then check that it did save.  In my case it would not save.  I suspect my theme sets this in one of its files, so I had to add the following code, courtesy of Andrew Norcross, to my child theme’s functions.php file:

To apply this fix the WordPress post images already posted, copy/paste this code into your functions.php file:

add_filter( 'the_content', 'attachment_image_link_remove_filter' );
function attachment_image_link_remove_filter( $content ) {
 $content =
 '{ wp-image-[0-9]*" /></a>}'),
 array('<img','" />'),
 return $content;

This fix is pretty cool because it will still let you assign custom URLs to your images when needed.

Redirect WordPress Attachment Pages

If your default WordPress post images appear in an attachment page, a page that looks like your site but only has the image on it as content, install the WordPress SEO plugin (which I’ve talked about extensively) and once it it activates click on SEO->Permalinks.  Choose “Redirect attachment URL’s to parent post URL”.


This will work for all of your images – past and future.

Create a Custom Attachment Page

You could also create a custom attachment page and even include some content on the page if you want to use custom fields. has an easy to understand article here on how to set up the attachment page.  Adding the code for custom fields is covered here and could be used to add information about the WordPress post image.  I imagine the custom attachment page is probably best used by people in the photograph, arts, or fashion fields to add details about the images.  Make sure you are adding substantial information so that the page is not considered thin content.  Also make sure your content is not simply a cut-and-paste of the content in your original article, otherwise you’ll be dinged for duplicating your content.


Follow me