Replies: 1 comment
-
Side note. The only way I found to avoid the Svelte error
and placing the "enhanced" query param at the end: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
this is what I'm trying to achieve:
Creating a component which I can pass img to and render it lazy loaded with a blurred placeholder while loading.
The example of what I managed to do so far will make it clearer.
The first version of the component (honestly interested about the snippet type comment above all):
How I used it:
This is working fine but it completely wastes the using of a component since the content must be placed manually everytime instead of passing, for example, the import url.
Second version I tried:
Component:
How I use it:
The second version is working fine too but it's really annoying to import images manually everytime (with svelte complaining about the import
Svelte: Cannot find module $lib/ assets/ background. webp?enhanced&blur=50 or its corresponding type declarations.
).Any suggestion to make this better?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions