I have this function in my theme to create thumbnail sizes.
set_post_thumbnail_size( 620, 848, true );
if (function_exists('add_image_size')){
add_image_size( 'compare-shop-logo', 150 );
add_image_size( 'compare-single-product-2', 250, 188, true );
add_image_size( 'compare-slider-image', 848, 487, true );
add_image_size( 'compare-offer-box', 400, 300, true);
add_image_size( 'compare-blog-box', 400, 225, true );
add_image_size( 'compare-quote-box', 408, 437, true );
}
How come that if I change the offer-box sizes, I lose the srcset and sizes in img tag? and is there a way to resize maintaining proportions?
<img width="400" height="300" src="myimage-400x300.jpg" class="embed-responsive-item wp-post-image" alt="image" srcset="myimage-1-400x300.jpg 400w, http:///myimage-250x188.jpg 250w" sizes="(max-width: 400px) 100vw, 400px">
thanks