• 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

    (@zecke)

    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.