SvelteKit needs an image optimisation library #10808
Replies: 4 comments 7 replies
-
Have you seen this package that works with SvelteKit? https://github.com/zerodevx/svelte-img It utilizes Vite's powerful "imagetools" (https://github.com/JonasKruckenberg/imagetools) Both are maintained and recently updated. |
Beta Was this translation helpful? Give feedback.
-
#10323 and #10788 are currently in progress to add dynamic / static image optimisation |
Beta Was this translation helpful? Give feedback.
-
https://github.com/JonasKruckenberg/imagetools I used this, it's very convenient as all you need to do is during image import just add a query like ?quality=90&format=webp. That's all. |
Beta Was this translation helpful? Give feedback.
-
Hi, does anyone know what the latest status of this is? Is there something similiar nowadays to Next Image or Nuxt Image which can also transform dynamic / external images (with something like Would be cool for small projects to have a built-in solution I guess, where you can't to pay for an external CDN service like imgix, etc. (Others pointed out that selfhosted https://github.com/unjs/ipx can be used in combination with https://unpic.pics/img/svelte/, but this requires selfhosting another service) |
Beta Was this translation helpful? Give feedback.
-
I was building my portfolio with SvelteKit and everything was going smoothly, until I introduced some images fetched from the backend. Suddenly, there is a 25% decrease in Lighthouse performance score.
I looked for image optimisation libraries, but I found none with official SvelteKit.
I looked for community packages, one looks promising called SVImage, but it has an issue with ES Module breaking the project.
Any serious project needs a good image optimisation tool given that images could come from any source.
Any ideas how to solve that issue?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions