Remove Annoying WordPress Default Image Links

Remove Annoying WordPress Default Image Links

How many of us have enjoyed the ease and functionality of uploading images to our WordPress site? No doubt, it’s one of the greatest web features to work with. Although, it can have a nasty little downside. Anybody guess what that might be? Yep, we’re talking about default image links. They attach themselves to our images automatically. And, we don’t want them! So, how do you remove annoying WordPress default image links? Let’s find out how to do it, effortlessly.

Remove Annoying WordPress Default Image Links Effortlessly

You write a post and add one of the images in your media file. That’s when that annoying default link finds a life. If you’re not aware of it, you might never know. Although, you should come across it. Ideally, sooner than later! In fact, you don’t want your pictures clickable to basically no place. It makes for a bad user experience. Think about it. The user sees the image is clickable. Although, it only takes them to the image file. As a result, they hit the back button. Worse, they just leave your site! Unfortunately, the latter is the most common result. Also, in the process your site’s SEO suffers a lot.  So, here’s how to remove annoying WordPress default image links effortlessly.

When uploading an image to your media file, you can uncheck the automatic link option right then. Although, sometimes, we just forget to do that. I know I do. Another option exists. In fact, it’s pretty straight forward and provides a blanket solution.

Remove Annoying WordPress Default Image Links with Code or Plugin

Remove annoying WordPress default image links by adding this code snippet in your theme’s functions.php file.

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 disable the default image link is just as easy. Simply  install and activate the “No Image Link” plugin. An added nicety about the plugin is that it has nothing to configure. Just plug in and activate. One last fact to know, the plugin will run its option for every page. As a result, the code has the edge with a more streamlined handling of the issue.

Do you ever want to add links to your images that will take people where you might really want them to go? Simply add the tried and true, tag. But, you knew that right?

Have more pressing questions about other WordPress features? Give us a call. At Prostyle Development, you talk to the pros. WP is what we love. It’s what we do.