Home › Forums › Back End › Responsive Thumbnails in WordPress › Reply To: Responsive Thumbnails in WordPress
September 12, 2013 at 1:59 pm
#149871
Andy Giesler
Participant
suis — for some reason part of jmy1138’s code didn’t get escaped correctly, but I recovered it from the HTML source.
This works for me:
if ( has_post_thumbnail() ) {
$image_src = wp_get_attachment_image_src( get_post_thumbnail_id(),’thumbnail’ );
echo '<img width="100%" src="' . $image_src[0] . '">';
}