WordPress: remove links to images

Last updated on October 10, 2022

This article has been archived and may contain outdated information.

WordPress default settings are somewhat awkward: if you insert an image (or any picture or media) in a post, the inserted image will link to itself. A visitor who reads your post will see a “hand pointer” when his mouse pointer goes over the image, and he may want to click on the image.

The image link only links to the image itself. This behavior is really problematic, as links should link to something interesting, and should not frustrate the visitor.

Solution 1: set image default link type to ‘blank’ in the hidden WordPress options menu

There are some solutions to remove the automatic link to image files on posts. This WordPress Forum post shows a quite elegant solution using the “secret” WordPress options menu at:

example.com/wp-admin/options.php

Look for the option ‘image_default_link_type” and change to “blank”. Unfortunately this tuning may be overwritten by future WordPress updates.

Solution 2: set the default link type to none in functions.php

This solution is has the same result as solution 1, but won’t be overwritten by an update. Add the following lines to your theme’s functions.php file:

add_action( 'after_setup_theme', 'default_attachment_display_settings' );
function default_attachment_display_settings() {
update_option( 'image_default_link_type', 'none' );
}

Solution 3: remove image links in existing posts

Unfortunately, solutions one and two only works for new posts, all existing posts will stay with their old image links. Try out this script from CFX design to remove image links in existing posts.

Articles by categories

Most Read Articles

Comments

5 thoughts on “How to edit image metadata on Linux using a graphical user interface”

  1. fotoxx lets you change Metadata info, and choose your current image’s Caption and Comment as well as view images in directories with filename and some other Metadata as labels. You can set up trees of tags with Categories and put those in at the same time, to use for sorting the images into “album” groups for moving or copying out. The code is gtk and perl with many filetype handlers. Your labeling is stored in plain text files, easy to copy out into documents, transfer, edit, etc.

  2. You should give some additional details, some tools write directly into the image file, others don’t. For example darktable does not change the original image, it writes into a sidecar file (.XMP).

  3. I don’t know whether you actually tested Gthumb or not, but your statement that it is only capable of reading meta tags, couldn’t be further from the truth. And it seems to do a fairly good while it is at it!

    All one have do is to press the ‘T’ key – either under the Thumbnail view or the “larger” view – and voilá: it reads any existing tags already embedded in the selected file. Next, you have to keep typing any new ones (just don’t forget to confirm, via the pull down list, to actually create any new tags) and you’re done.

  4. I would also suggest that MaPiVi is an excellent program which needs to be on this list. It’s capable of editing and bulk-editing many kinds of image metadata, including IPTC Keywords (which is why I got it). It’s written in Perl/TK so it’s cross-platform. A somewhat old version of it is included in the Ubuntu Linux distribution.

    One of the main drawbacks of MaPiVi is that it won’t handle the metadata in Nikon .NEF (raw) format files, which is pretty much the same as that in other formats such as JPEG.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.