You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't figure out how to dynamically enhance images properly. I've added ?enhanced part and images are processed into different formats. However, srcset has only 2 variants:
You may have to add a w query parameter for sizes smaller than 540px.
The smallest picture generated automatically will have a width of 540px. If you'd like smaller images or would otherwise like to specify custom widths, you can do that with the w query parameter:
qs.get('imgSizes') is supposed to have sizes from img tag but it's empty for ?enhanced imports.
Imports:
'$lib/assets/images/boston-overview.jpg?enhanced' - qs.get('imgSizes') is empty, even though <enhanced:img ... sizes /> has it
'$lib/assets/images/boston-overview.jpg?enhanced&imgSizes="(width >= 700px) 500px, 100px"' - qs.get('imgSizes') is populated correctly and 540px and other sizes are generated
The remaining part is to find why imgSizes is not populated from img tag 🕵️♂️🐛
Describe the bug
Hey 👋
I can't figure out how to dynamically enhance images properly. I've added
?enhanced
part and images are processed into different formats. However,srcset
has only 2 variants:Images have different formats but
srcset
with 2 variants:When importing same file directly with a path, images with multiple
srcset
are created:Same image a lot more
srcset
variants:What can be the reason?
I'd love to have the second variant but for
?enhanced
images.Tried importing using various variants from #11535 with no luck.
Reproduction
https://github.com/vladshcherbin/svelte-lab
Can be run with standard
pnpm dev
(or other package manager)Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: