Streaming live at 10am (PST)

Image size attribute option in VW

Hi,

We have built using vw image size and font, width of container and div.

https://www.demandfarm.com/

I found some issues with this now in core web vitals

It asks to set an explicit width and height on image elements to reduce layout shifts and improve CLS (Please refer image1) . But webflow only allows in px to set explicit width and height in px not in other options like vw,%, pt,em ( Please refer image2 ).

Can anyone help me resolve this?

That is because pixels is the only value supported on image width and height in the HTML spec.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img