I use the custom field photo
to upload an image. In the frontend I get its URL with this code:
$imgid=get_post_meta($post->ID, 'photo', true);
$img=wp_get_attachment_image_src($imgid);
$imgurl=$img[0];
Now I want to show it using the standard WP sizes (thumbnail, medium, ...) of the_post_thumbnail().
I've tried some solutions that don't work:
the_post_thumbnail('medium', array('src' => $imgurl));
or
the_post_thumbnail('medium', $img);
Any ideas?