Is there a way to generate the srcset & format optimization of an image using ?jsx without the width and height ?
It's harder to style image width/height in the CSS if width & height are already set on the HTML. For example :
.parent{
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* dynamic width */
}
/* If width & height are set */
.child-img {
width: 100%;
height: auto;
}
/* Normal behavior */
.child-img {
aspect-ratio: 1/1; /* <- Let the browser knows it's a square to keep space */
}