you're reading:
Attachment pages, Images, Links

Uploading and inserting images: the three (plus one) link options

https://wpbtips.wordpress.com/

[Updated December 2012]

When you click the “Add Media” button of the post or page editor and select an image from your media library or upload an image from your computer, you get four “Link to” options prior to inserting the image: None, Media File, Attachment Page, Custom URL. These options determine what happens when you click on an inserted image:
misty-tree-400 None“: clicking on the inserted image has no effect.
misty-tree-1200 Media File“: clicking on the inserted image links to the full-size original alone.
(The field below the pulldown displays the URL of the uploaded image.)
misty-tree-600 Attachment Page“: clicking on the inserted image links to a blog-like attachment page with the image on it.
(The field below the pulldown displays the URL of the attachment page.)
misty-tree-400 Custom URL“: clicking on the inserted image links to any webpage.
(Paste the URL of that webpage into the field below the pulldown.)

The default is “None”: if you prefer one of the other options, you’ll have to click the relevant tab. The tool will remember your last choice, so you only have to do this once (as long as you don’t want a different option in another post or page).

To change the link status of an image after it has been uploaded and inserted, you go to the Visual editor, click on the image, click the edit button that shows up (the mountain icon), click “Link to Image” (or “None”, if what you want is the opposite), click Update. To turn a linking image into a non-linking one, in particular, you can also click on the image (in the Visual editor) then click the Unlink button of the editor.

Attachment pages are a strange invention. They are automatically created, but they are not permanent, and they don’t get included in your list of pages, so you have almost no control over them. You can change the page title (the default is the name of the uploaded image the way it comes up in the URL), but you can’t change the alignment or the borders of the image; and… visitors can leave comments.

Currently there are two ways to disable commenting on attachment pages (as well as on gallery “carousel” slideshow images):
a) Disable commenting in Settings > Discussion, upload and insert the image(s), then enable commenting in the Discussion module of the post/page editor. If you’re not seeing the Discussion module while on the post/page editor screen, click Screen Options (top right) and check “Discussion”. You can also enable commenting if you go to Posts/Pages > All Posts/Pages and click Quick Edit (under the post/page title).
b) Upload and insert the image(s), then go to Media > Library and edit each image to disable commenting in its own Discussion module. Again, to make the Discussion module show up, click Screen Options.

The chief merit of attachment pages is that you can include notes on the image. You write these notes in the “Description” box that shows up after you upload the image.

Note that the description box is not available when you click the edit button of an already inserted image – not even in the “Advanced Settings”: if you want to add or edit a description for an image already uploaded and inserted in a post or a page, you must access it via the Media Library. When the “Post URL” option has been selected, you can also access it via the “Edit” tab of the attachment page.

Both the attachment pages and the full-size originals can be made to open in a new browser window, as in the examples above. Unfortunately, this option is not available when you initially upload and insert an image – you have to do it afterwards: you click the edit button of the image (in the Visual editor), click Advanced Settings, scroll down to Advanced Link Settings, tick “Open link in a new window”, click Update; or you add the relevant piece of code in the html editor (see here).

https://wpbtips.wordpress.com/

Please don’t paste code in comments – see comment guidelines.

Discussion

26 thoughts on “Uploading and inserting images: the three (plus one) link options

  1. At the risk of being irrelevant, take a look at the pictures here:
    http://thevfiles.wordpress.com/2009/03/09/springing-forward/
    (well, the last one is too large and is breaking the theme)
    I thought the captions had links, so to satisfy my curiosity, I looked at the code and found that the pictures are in div class enclosure tags. What’s that about? How did she do that?

    Posted by Tess | April 27, 2009, 17:16
  2. Interesting… I know just as much as you do: haven’t seen “enclosure” before, have no idea how it works, can’t find it in html tutorials. Maybe devblog would tell us, if he hadn’t disappeared from the forum.

    Posted by Panos | April 28, 2009, 01:21
  3. Actually, I like the attachment pages. Just wish they were a bit more flexible, like inheriting the category of the Post, not to mention usable navigation. But who knows what they’ll be dishing up in 2.8. Guess we’ll just have to wait and see.

    Posted by Jennifer | May 16, 2009, 12:00
  4. Hm, I guess I’ll have to take that back. Since switching to Vigilance, the attachment pages inherit the Post category, there’s even some nice thumbnail navigation, but (and there had to be one) apparently no way to get back to the main Post itself.

    Posted by Jennifer | May 16, 2009, 13:16
  5. Well what I don’t like is that you can’t control anything in the attachment pages, e.g. image size or alignment. Vigilance may be better, since it’s newly designed and probably took the attachment pages into account, while most of the other themes predate that invention.

    Posted by Panos | May 17, 2009, 04:34
  6. You can’t turn off the comments, but you could put a link to the post page in the comment of each attachment page.

    Posted by Tess | May 18, 2009, 08:09
  7. Good idea. Or a notice that you don’t want comments in the attachment page.

    [Update: post now includes how to have attachment pages with no comment box – P.]

    Posted by Panos | May 18, 2009, 08:15
  8. Uhm, you can ask, certainly. Someone purposely left a comment on one of my post’s unlinked attachment pages.

    Rumor had it that media was supposed to get another overhaul in 2.8. Since, according to Nick, WP.com has been running the 2.8 code for a couple of weeks, I’m curious as to what, if anything, has changed.

    Posted by Jennifer | May 18, 2009, 13:02
  9. You both probably know this but in the Pressrow theme there is a link in the titles of the attachment pages back to the post.
    And in Vigilance, if you are logged in you can edit the description of the photos in attachment pages without having to go back to the media library for editing.
    Digg3 has neither of those options…
    Seems a lot of inconsistency for attachment pages—each theme has its own quirks with them.

    Posted by Tess | May 18, 2009, 19:05
  10. @Tess: The “Edit” tab in attachment pages is present in all themes, I think. It certainly is in Digg3.

    Posted by Panos | May 19, 2009, 00:02
  11. Right you are. It’s up on top, not below.

    You are George Burns. I’m Gracie Allen.

    O, oh well, the idiot savant…

    Posted by Tess | May 19, 2009, 02:18
  12. George Burns? No way – too old!!!

    Posted by Panos | May 19, 2009, 02:25
  13. No, not those movies where he played God!!!
    Think farther back, child.

    He was young and cute, once. (before my time)
    And Gracie Allen was so beautiful.
    The love of his life.

    She was his “straight-man,” and always was sort of ditzy. Look at the radio days…

    Posted by Tess | May 19, 2009, 03:09
  14. Thank you again, I was looking for a way to do this.
    Your blog has been really helpful to me.
    thanks.

    Posted by happychinchilla | September 25, 2009, 06:22
  15. You’re welcome again!

    Posted by Panos | September 25, 2009, 08:52
  16. Great post, interesting info thanks. Do you know of a way to retroactively change all the links to ‘none’? There must be a plugin if no native support for this but I haven’t seen anything.

    Also, how do you add the ‘Notify me of site updates’ button to the comment form? I’ve been wondering for a while!

    Cheers!

    Posted by David Lawton | May 5, 2010, 11:29
  17. @David: You’re welcome, but I’m afraid I can’t help – I’m only experienced in wp.com blogs, not self-hosted ones. (In a wp.com blog you can’t bulk edit images, you can’t use plugins, and the notify option is built-in.)

    Posted by Panos | May 5, 2010, 19:36
  18. Ah I see, ok well thanks for the response, it’s appreciated

    Posted by David Lawton | May 5, 2010, 22:57
  19. I want to have the option to enable “open comments” in my gallery attachments but only from approved authors/users. I seem to have the opposite problem where currently my comments are off. Is it possible to turn them on for each attachment from the gallery?

    Posted by williambaggett | May 19, 2010, 02:39
  20. @WB: As I’m explaining in the post, attachment pages adopt the default settings, and you cannot edit them, so you cannot change their comment status after the post is published. You need to do what I’m describing in the post, only in reverse: go to Settings>Discussion, enable commenting, create the gallery post anew, then go to Settings>Discussion and disable commenting again.

    Posted by Panos | May 19, 2010, 08:25
  21. Hi Panos, I have posted some photos using the Post URL option but when the photo attachment page opens up there is no way to click the actual image to get to the original photo (whereas in your attachment page example above, I can click the photo on the attachment page to get to the original .jpg). Is there some way to fix this? Thanks!!

    Posted by Lucy | May 21, 2010, 00:25
  22. @Lucy: Hi! No there’s no way to change this – it’s theme dependent. In all older themes, the behavior is as in my blog. In new themes (such as iNove), it doesn’t work that way. In my opinion, that’s an improvement: I think a clickable image should link to the attachment page or the full-size original, not both. If you’d like the latter, there’s no need for the former: choose File URL!

    Posted by Panos | May 21, 2010, 00:50
  23. Any word if a plugin exists that allows the pictures to be opened in the same window? I don’t want an attachment page or a file page, but a box that opens up on the page and gives a full view in the same window. And something that is easy to close without ever leaving the post. Does this exist?

    Posted by Angel | November 7, 2010, 04:41
  24. @Angel: I don’t know. You’re talking about self-hosted blogs while my blog is about wp.com ones ( = plugins not supported). You can ask at the wp.org forum.

    Posted by Panos | November 7, 2010, 09:54

Trackbacks/Pingbacks

  1. Pingback: Yesterday I discovered Forums « Stephanie’s Stitching Module 5 - July 9, 2009

  2. Pingback: Help! I can’t see my images « one cool site - May 11, 2011

Author

author's avatar panos (justpi)

 Subject Index

Announcement 22/03/2012: After WP's latest move, this blog will no longer offer active support and assistance. The blog will remain online but commenting has been disabled.
✶ All theme-related posts are updated up to and including theme 189 in this list, but will not continue to be updated.

Stats

  • 3,961,579 views
Safari Icon Firefox - Never Internet Explorer
Note: if you see ads on this site, they are placed by WordPress, not me.
wpbtips.wordpress.com
Mostly on themes, formatting, coding, tweaks and workarounds.
Based on or springing from my contributing in the wp.com forum.
Theme-related posts constantly updated
Premium themes and Annotum not included