Stupid annoying image links

Meet Frank – our hardware engineer

By default, WordPress links images to themselves. When someone visits your site they will see that your image is a link, click it and get sent to a media file image page. From this page the user has two options: click the ‘back’ button in their browser or move on to another site. Usually it is the latter.

It also affects your image SEO traffic because search engines could redirect users to the link used for the image instead of your post. Overall, it creates bad user experience and affects your site’s bounce rate.

One solution is that you simply select the option disable the link each time, but it is not feasible because sometimes you simply forget.


Removing default image links in WordPress

It is very simple to disable the default image linking behaviour in WordPress. All you have to do is add this code snippet in your theme’s functions.php

// fluffytech: set default image link to none

function wpb_imagelink_setup() {
    $image_set = get_option( 'image_default_link_type' );
    if ($image_set !== 'none') {
        update_option('image_default_link_type', 'none');
add_action('admin_init', 'wpb_imagelink_setup', 10);

Another way to do this is by installing and activating No Image Link plugin. It works out of the box and there are no options to configure. However, the plugin runs the option on every page, so it is better to simply add the code on your own.

Hopefully this will make adding images in WordPress a little less annoying specially if you never link to images.



Can I still get an image to link?

Yes, When adding a photo, under the ‘Image Link’ option, choose ‘File URL’

Why do images already have links?

WordPress’ default setting is to link images to themselves.

Does this remove links on existing images?

No it does not. You will have to manually remove links off of existing images.


Source: Wpbeginner / Norcross
Facearse Tweep Internetmail

Leave a fluffy comment...

Your email address will not be published. Required fields are marked *