Get url of edited/cropped image
-
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)
Viewing 1 replies (of 1 total)
- The topic ‘Get url of edited/cropped image’ is closed to new replies.