svelte-image
svelte-image copied to clipboard
Setting height and width on Images seem's like not working
Can i somehow remove layout shift which is happening when the image is loading?
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
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.