ohbob / svelte-responsive-images

Image optimization component for svelte
38 stars 3 forks source link

External Images? #4

Open alteredorange opened 3 years ago

alteredorange commented 3 years ago

Heyo! Great plugin! It looks like the external url functions don't work. As far as I can tell, it can only process local images (unless you pass in an array of external images). I guess the only way to process external images would be some sort of through the vite plugin? Any idea on how that could work? Thanks again!

ohbob commented 3 years ago

Hello, thanks. I've started to tinker with external URLs, if you take a look in https://github.com/ohbob/svelte-responsive-images/blob/master/lib/imageOptimizer.js you will see the code for that.

enable got and ExternalImage(url) use ConvertExternal(url), hope that helps.

algoflows commented 2 years ago

Does loading external images work?