Closed Oceanbao closed 1 year ago
Hey, glad you found this useful.
I was wondering is there a way to set the sizes prop on the resulting
<img>
tag?
You can just set sizes
prop (or in fact any other standard <img>
tag props) on the <Img>
component and they will be mirrored into the resulting <img>
tag.
Also the width/heigth and media props on
<source>
tag
Not right now at the moment - this package is intended to be kind of a set-and-forget thing to replace how one would normally use an <img>
tag, so I thought art direction may be out of scope. Might add support in a future release!
That's superb. Thank you for clearing that up. That is very useful to know.
Bravo and thank you for making this tool. I find it the best among a handful image-optimisation libs for Svelte that I Googled.
I was wondering is there a way to set the
sizes
prop on the resulting<img>
tag? Also thewidth/heigth
andmedia
props on<source>
tag.Thank you so much.