Can anyone tell me how to use PHP to dynamically pull the src url for an image?
Can anyone tell me how to use PHP to dynamically pull the src url for an image?
Okay, thanks for that. I'm trying to get the medium image src and this code's size parameter doesn't filter down to the medium size, it only returns the full size. The wp_get_attachment_image will filter down to the medium size, but I need the src url from that, not the actual image.
<?php $uri = wp_get_attachment_image_src( $post->ID, 'medium' );
echo $uri[0];?>
works for me.
Thanks Esmi.
This topic has been closed to new replies.