Stop images becoming links – fix the default link setting

Remove the default image link from WordPressDo the images in your blog post turn into links when you don’t want a link? Is the link just a blank page containing only the image? It does not look good does it? (and takes visitors away from your page unless they hit the back button)?

You can remove the link for each image if you remember to press the ‘none’ button when you insert it, but I often forget.

Most of the time you want the image to simply be an image (and if you want it to be a larger version of itself there are better ways to do it). By default WordPress will set the link for all new images as a link to it’s own file. Luckily, it is possible to set the default to be none or to the post itself.

Use the WordPress hidden settings page – be careful

This change involves using an hidden page in the WordPress Dashboard, be careful as it’s hidden for a good reason and changing the wrong thing could break your blog! With that in mind, go to your blog’s dashboard you will see the link in your browser’s address bar is something like this (where example.com is your blog name with optional path).
http://www.example.com/wp-admin/index.php

Using the hidden options page in WordPress to change the default image link

Now over-type the index.php part of this URL so that it ends with options.php instead and press enter
http://www.example.com/wp-admin/options.php

You will see a screen titled ‘All Settings’ like the one show here

Search down the page until you find the option called image_default_link_type which will probably be set to file. Change this to any of the following:

  • none – The image will not be a link (actually this can be anything apart from file or post but none makes more sense if you are looking later)
  • file – The image will link to a copy of itself (the natural default for WordPress)
  • post – The image will link to the post that contains it (what’s the point of that?)

At the very bottom of the screen is a save button – Be very careful not to change any other setting!

Now all new images you add will have the new default link setting

The add media screen with default image orf (URL set to none)

Notice that now when you add a new image to any post it will default to none / blank.

If you had already added an image to your library before making this change it will probably remember whatever setting you chose at the time but all new ones will have the new default.

You can change the setting for any image you like if you really do want this one to link to file or post by using the buttons under the Link URL input box.

Enjoy your images without having to remember to set the link to none every time.

Brian

This entry was posted in Content, WordPress and tagged . Bookmark the permalink.