I have noticed that using the post_thumbnail() function in WordPress inserts the image including the img-tag. Is there a way to have it insert ONLY the src of that image?
Sofar i have tried this
$image = get_the_post_thumbnail( $post->ID, 'thumbnail' ); echo $image;
but it just exports the same.
Any ideas? thanks in advance for your help 🙂
Found answer. Thanks anyway.
Post Thumbnail Linking to large Image Size
This example links to the âlargeâ Post Thumbnail image size and must be used within The Loop.
Source : https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/