When you insert an image into a WordPress post using the media uploader, there are three options: none, file url, or post url. You can also enter a custom link. I want to see a fourth option to link the image to the post that we are inserting our image in.
None obviously removes links altogether. File url links the image to the source file. Post url links the image to the attachment page, as attachments are their own post type in WordPress. None of these options are very good if your image is a prominent part of your post and you want it to link to the post itself.
Let’s say you use a typical blog format and display full content on your blog or home page. You may include up to three or four paragraphs for each post before a read more link that goes to the singular post page. When someone is on your home page and wants to read the full post, a big feature image is a likely candidate to click on to view the full post, so we don’t want this image to link to the source file or attachment file.
We also don’t want it to not link, because the user may expect that it links to the full post view. It is common practice when showing excerpts, rather than full content, to link images to the singular post page. We want to mimic that functionality when viewing home and blog pages with full content and more links. Even if more links aren’t present, we still don’t want to send the user to the attachment or image source pages if they happen to click the feature image.
Currently, you can enter a custom url, and it is easy enough to grab the shortlink from the main post edit screen to do so, but I don’t think it’s good enough. This is a fairly common use case, and there should be a fourth button in the media uploader to link the image attachment to the post itself.
I’ve looked for ways to add this functionality myself, but haven’t been able to figure it out. If anyone knows how, I’d love to see it.