Sizes attribute not returned inf response for webp

Hi team,

I’ve noticed that using the html api, the sizes attribute is missing for the webp version of the image when multiple images are in a grid, while the sizes attribute is present in the non-webp version of the image. This results in a bigger image being loaded than necessary.

Builder content link
Link to the html being injected using a dangerouslySetInnerHTML in Nextjs
https://cdn.builder.io/api/v1/html/product-landing-page?apiKey=dc5c96804c6c4a068e9558f30660aaee&userAttributes.urlPath=/test

Detailed steps to reproduce the bug

Screenshots or video link

Code stack you are integrating Builder with
*NextJS

I tried using the content API instead of the html api, but the behaviour is the same.

Thanks!
Vincent

@vperrin Thank you for bringing this to our attention! I have created an internal ticket and will have one of our devs investigate, it does appear to be a bug on our end! We appreciate the feedback and will let you know once we are able to fix!

Excellent, thanks for getting back to me @TimG .

Best,
Vincent

1 Like