Closed AaronNBrock closed 11 months ago
Hey, apologies for the late reply. Stoked that you're able to help! I'm also wondering what the best way to handle this is. I'm bit apprehensive for svelte-img
to handle art direction - kinda think it should focus on solving the most common cases.
Thanks for the art direction link ~ I hadn't even thought of that!
In my use case I'm not trying to change the variants that are generated but when they are displayed. Specifically I have an image which only takes up about 10% the width of the page, but at the moment by default when the screen is 1920px wide svelte-img will display the image with 1920w even though the image is only 1/10th that width. I'd like to be able to configure that.
For images which only cover a small portion of the view port, it would be useful to be able to define breakpoints as opposed to the breakpoints always the width of the rendered image on this line.
I'm happy to help contribute, but I'm not sure the best way to implement this. It could be as simple as adding an exported field on the
SvelteImg
component:or adding as an import option:
or something else, would love your thoughts @zerodevx
I'm happy to help contribute, but I'm not sure the best way to implement this.