Title: get_the_attachment
Last modified: August 21, 2016

---

# get_the_attachment

 *  [zecke](https://wordpress.org/support/users/zecke/)
 * (@zecke)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/get_the_attachment/)
 * Hi. I got code that displays image on attachment page in wordress:
 * `<?php $attachment_link = get_the_attachment_link($post->ID, true, array(744,
   1116)); ?>`
 * It`s working fine, but it displays original attached photo (high res) scaled 
   down to 744px width.
 * I need to change that code to display the photo that is automatic sized by wordpress(
   in settings->media) the large one (it appears in uploads folder after uploading
   photo). I already change the setting to 744px.
 * I hope wrote everything clear.
 * Please help me if You can
    Rafal

Viewing 1 replies (of 1 total)

 *  Thread Starter [zecke](https://wordpress.org/support/users/zecke/)
 * (@zecke)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/get_the_attachment/#post-4385967)
 * Ok. I found the answer:
    `<?php $attachment_link = wp_get_attachment_link($image-
   >ID, 'large'); ?>`

Viewing 1 replies (of 1 total)

The topic ‘get_the_attachment’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [zecke](https://wordpress.org/support/users/zecke/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/get_the_attachment/#post-4385967)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
