Responsive Featured Images Not Working

Perhaps I am misunderstanding (likely) but I am trying to use TwentySixteens method to try and make the images I upload through WordPress responsive.

I have only barely modified the code, but no matter what I try the images do not resize.

Here’s what I added to my functions.php:

function b2f_post_thumbnail_sizes( $attr, $attachment, $size ) {
if( ‘post-thumbnail’ === $size ) {
$attr[‘sizes’] = ‘(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px’;
return $attr;

add_filter( ‘wp_get_attachment_image_attributes’, ‘b2f_post_thumbnail_sizes’, 10, 3 );

I am using:


in Index.php to call my image. However it is not being resized.

Any ideas as to why?

Read more here:: Responsive Featured Images Not Working

Leave a Reply

Your email address will not be published. Required fields are marked *