Title: image linking
Last modified: August 18, 2016

---

# image linking

 *  Resolved [djspark](https://wordpress.org/support/users/djspark/)
 * (@djspark)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/image-linking/)
 * I could not find anywhere on support/codex:
    Is there a way from the single post
   template to know wich image(s) are attached to the post ?
 * I saw on the attachment subpost, it refers to ‘$post->parent_post’ , but from
   the post, could not find any reference to the attachments…
 * any ideas ?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [lunapapa](https://wordpress.org/support/users/lunapapa/)
 * (@lunapapa)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/image-linking/#post-315755)
 * This post might help you get rid of your problem :
    [http://wordpress.org/support/topic/39478?replies=6](http://wordpress.org/support/topic/39478?replies=6)
 *  Thread Starter [djspark](https://wordpress.org/support/users/djspark/)
 * (@djspark)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/image-linking/#post-315783)
 * That solution implies I create a custom field for it (no prob if there’s no other
   way), but since you can attach an image/video/whatever to the post with the inline
   upload tool, why would I use another way ?
 *  [lunapapa](https://wordpress.org/support/users/lunapapa/)
 * (@lunapapa)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/image-linking/#post-315866)
 * So warn me whenever you get the answer. I spent a couple of hours to find an 
   elegant solution to this problem. There’s also the alternative to grab the image
   tag from the DOM. That’s not elegant either.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘image linking’ is closed to new replies.

## Tags

 * [wp2](https://wordpress.org/support/topic-tag/wp2/)

 * 3 replies
 * 2 participants
 * Last reply from: [lunapapa](https://wordpress.org/support/users/lunapapa/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/image-linking/#post-315866)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
