• Hello,

    Hoping that someone might be able to point me in the right direction. Are there any wordpress functions to get the url of an uploaded image that has been cropped/resized within the media gallery? wp_get_attachment_image_src only has the native size variations. At the moment I’m fudging it with the below after getting the original image ID from the post table…but it’s a but clumsy…

    $croppedpic = get_post_meta($row->ID,'_wp_attached_file', true);
            if($croppedpic){
            ?>
            <img src="<?php bloginfo('template_url');?>/images/<? echo $croppedpic; ?>" />
            <?
            }

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter Kinchan

    (@kinchan)

    O.K – found the solution…which makes me feel stupid.

    The native full size actually pulls through the edited version. Duh!

    <?php wp_get_attachment_image_src( $attachment_id, full ); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Get url of edited/cropped image’ is closed to new replies.