Is there a way to remove the link on full size images in posts/pages?

I still would like to have it for the other smaller sizes. Since the full size image is already full size, it seems unnecessary to link to itself.

  • Your question is not specific enough. What code are you using? What theme? Do you have an example of this full-size image with link? You need to give a lot more information for anybody to be able to help you. – Otto Sep 7 '12 at 19:57
  • @Otto No code as of yet. There didn't appear to be a simple and obvious built-in approach, so that's why I'm asking. Any image you insert in a post/page using the editor exhibits this behavior. The theme doesn't matter for this question. – Force Flow Sep 9 '12 at 3:05
  • If you're just inserting the image via the media system, the link can be anything you like, or no link at all. So, given that, what is the actual question here? – Otto Sep 9 '12 at 3:06
  • To not have the image linked by default – Force Flow Sep 9 '12 at 3:23

If you're adding the full size image from the Post Editor, when you select the image from the media manager pop-up box, you'll click the button that says "None" under the Link URL field.

That would be impossibly messy to control programatically. Well, maybe not impossible, but probably something that you would just hack with jQuery or something. (Find all full size images and remove the A tag sort of thing.)

| improve this answer | |
  • Is there a way to do this without requiring an extra step for users using the editor? – Force Flow Sep 9 '12 at 3:05

Go to /wp-admin/options.php. This will give you the master list of all options. Note that it is not wise to modify things on this page, you can easily break stuff here.

Scroll down until you find the "image_default_link_type" option. It may be empty.

Valid values here are "none", "file", and "post".

Set it to "none" to have the default link for new image insertions be blank.

After you enter the new value, you can go down to the Save button, or simply press enter to save the value.

Again, it is not recommended to change setting values via this screen, but there is no other method by which to modify this internal option.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.