No srcset for hard-cropped thumbnails
-
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)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘No srcset for hard-cropped thumbnails’ is closed to new replies.