svelte-image icon indicating copy to clipboard operation
svelte-image copied to clipboard

Setting height and width on Images seem's like not working

Open VladSez opened this issue 4 years ago • 1 comments

Can i somehow remove layout shift which is happening when the image is loading?

image

image

This is my code: <Image src="CV.png" width="765" height="1400" class="cv" /> :global(.cv) { width: 100%; height: auto; }

That's can be the issue https://github.com/whatwg/html/issues/4968

VladSez avatar Jul 12 '20 12:07 VladSez

I'm actually also curious about this. I haven't had a chance to use this repository but @VladSez the layout shift would be coming from the placeholder to image change, the sizes would need to be set there to avoid the CLS. Would love to see how this implemented.

dikaio avatar Jul 14 '20 03:07 dikaio