• I am calling for the featured image on the post page of my site and want that image to be full width of the browser, so I am uploading a 2000px or larger images. Yet with the new responsive image feature in 4.4 Clifford, the srcset limits the highest width image to 1024px wide, no matter if I change the settings in the media settings. ie:

    <img width="2400" height="1060" src="img.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" srcset="img-300x133.jpg 300w, img-1024x452.jpg 1024w" sizes="(max-width: 2400px) 100vw, 2400px">

    I am having issues with the codex of this new feature. Does anyone have a way to hack this new feature so that that the 1024w image is the full image?

Viewing 7 replies - 1 through 7 (of 7 total)
  • I just encountered this same issue, using the_post_thumbnail('full'); on an uploaded image size of 1920px x 884px is returning a srcset with the full size image as default, but the 1024px width image (the “Large” size in the Media settings) as the image actually displaying. I changed the Large size in settings to 1920px and it doesn’t make a difference.

    I am having the same exact problem! This is driving me crazy! Anyone have a fix or solution yet?

    Moderator bcworkz

    (@bcworkz)

    Maybe a direction to pursue can be found here?

    Responsive Images in WordPress 4.4

    Hi everyone,

    By default, we chose to limit the largest size included in srcset attributes to 1600px. You can remove that limit by pasting the following code into your theme’s functions.php file, or in a separate plugin.

    // Remove max_srcset_image_width.
     function remove_max_srcset_image_width( $max_width ) {
         return false;
     }
    add_filter( 'max_srcset_image_width', 'remove_max_srcset_image_width' );

    Joe

    @joe McGill

    THANK YOU, SIR! This worked! <3

    Thread Starter jabbersquat

    (@jabbersquat)

    @joe McGill
    That was very helpful. Thanks.

    This is not working for me joe

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Featured Images with new Responsive Images srcset’ is closed to new replies.