• I am using hard-crop on featured images in my functions.php file like this :

    function srcset_test() { 
    add_theme_support( 'post-thumbnails' ); 
    add_image_size( 'custom-thumbnail', 635, 230, true ); } 
    add_action( 'after_setup_theme', 'srcset_test' );

    I have no other plugin installed, not even Jetpack. No matter how large the image I upload wordpress won’t add srcset for my cropped featured images.

    The problem seems to be with hard crop feature because the srcset shows correctly on any other image posted in article (from media for example). If I deactivate the hard crop the srcset shows correctly on the thumbnails too.

Viewing 2 replies - 1 through 2 (of 2 total)
  • This could be controlled by your theme. What theme are you using? Where did you download it from? Have you edited the theme’s template files to reference the new image size? What is the maximum image size set within your theme?

    Thread Starter grimox

    (@grimox)

    I tested and I am having this problem on both twentysixteen and twentyfifteen themes without any modification but the hard crop one. When I activate hard crop the srcset no longe shows.
    The biggest image I have is 1920×1080.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No srcset for hard-cropped thumbnails’ is closed to new replies.