One of the more annoying “features” introduced during one of the WordPress updates which occurred during 2010 was the way that default links are applied to images you add to your pages/posts. I’m not sure exactly which update this started to occur in, but if you know, please leave a comment.
Prior to this, by default, images had NO Link, so unless you had intentionally applied a link to them clicking an image would have no effect. Since the update however the default link has been set to the image itself, so now, unless you manually remove the link, or change the link to some other value, clicking any image will take you to the image itself – at it’s original size.
I (and many other WordPress users) find this extremely annoying, as usually when I add an image to a page or post I don’t wish it to link anywhere at all, so have to spend extra time (if I remember) removing or changing the links.
How to Change Default Image Link
I expect before long a plugin will become available – or preferably a configurable option in WordPress Settings (Settings>> Media seems a logical choice), however, in the interim, there is a fix. Fortunately we are able to change the default
Link URL but the process is a little tucked away.
The setting specifying the default link type is a WordPress option known “
image_default_link_type“. If you are handy with cpanel/phpmyadmin or MySQL you could change this direct via the database (however I would not recommend this unless you were very competent). There is a much simpler method though – by accessing the hidden WordPress options serttings screen by visiting http://yourdomain.com/wp-admin/options.php (where
yourdomain.com is the domain of your own site and if necessary path to the directory WordPress is installed for our site). You will nee to be logged in as an administrator to access this page.
After accessing the page, search for “
image_default_link_type” (its in alphabetical order). By default the default value it is probably set to “
This field has a few options:
- blank (Yes nothing at all, or you can use “
none“ if you prefer)
file– Use the File URL, e.g.: http://yourdomain.com/wp-content/uploads/2011/08/image.png
post– Use the Post URL, e.g.: http://yourdomain.com/?attachment=18
Change the value to none (or blank), and save the changes by scrolling to the bottom, and clicking the “Save Changes” button.
Any NEW images you upload will now have a Default Link value of nothing (i.e. will not be clickable), but any images you have already loaded may still have the original “file” Link value. If you want to change these.you may need to reload the images or manually remove the links.