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
Technically it is a bug, because it should work, but seeing the source code it was not implemented at all.
I'm looking for a way to set the quality of all images by default, and then crop and tint a dynamically some imported image. Obviously, this issue is geared toward having imagetools work for dynamic import first :).
import MyImage from './path/to/your/image.jpg?enhanced&quality=80&tint=#ffaa22';
Alternatives considered
Make enhanced:img accept a variable as src for loops.
Importance
i cannot use SvelteKit without it
Additional Information
Not having this is kind of a nightmare IMO when trying to optimize images as much as possible and when using components for almost everything (Hero banner, Section's background, Image loop, galleries, etc all must use dynamic import of the images if using enhanced:img.
I didn't find a way yet on how to use it with user uploaded content since it change the image at build time.
The text was updated successfully, but these errors were encountered:
Yes, someone on discord pointed out that it should work, and it's only a TS issue, so I simply add //@ts-ignore every time I use that haha and now it works.
Thanks for the ambient template, that is a big quality of life improvement... Where is that file? Directly in the node_module for enhanced image ?
I never used the meta.blob, I find it polute the code and reduce readability by a lot, but if need be I guess I'll have no choice. I'll keep that snippet somewhere :D
Describe the problem
Technically it is a bug, because it should work, but seeing the source code it was not implemented at all.
I'm looking for a way to set the quality of all images by default, and then crop and tint a dynamically some imported image. Obviously, this issue is geared toward having imagetools work for dynamic import first :).
To add to @flippbit list of things that doesn't work:
(#11535 (comment))
Throw an error:
Sidenote:
Nuxt Img can have a global configuration to set default quality, etc: https://image.nuxt.com/get-started/configuration
*EDIT Thanks to a discord mod:
It should be implemented and is a type error:
JonasKruckenberg/imagetools#160 (comment)
sveltejs/enhanced-img type:
https://github.com/sveltejs/kit/blob/6056ba30e29ac5747c356fbf1a42dd71f2c4aa1f/packages/enhanced-img/types/ambient.d.ts
Describe the proposed solution
Implement
Alternatives considered
Make
enhanced:img
accept a variable assrc
for loops.Importance
i cannot use SvelteKit without it
Additional Information
Not having this is kind of a nightmare IMO when trying to optimize images as much as possible and when using components for almost everything (Hero banner, Section's background, Image loop, galleries, etc all must use dynamic import of the images if using enhanced:img.
I didn't find a way yet on how to use it with user uploaded content since it change the image at build time.
The text was updated successfully, but these errors were encountered: