Replies: 1 comment 3 replies
-
Hey! You question basically boils down to wether or not vite can resolve the dynamic import pattern. From my experience this is very finicky and tends to break for no obvious reason (e.g. when testing yesterday one level of function nesting worked fine while two levels completely broke it). So the answer to your question is a resounding maybe ;) This situation is not ideal but I think without providing some extra import hints or something it's not really feasible (I feel like there would be some potential for another plugin though) To end this on a less depressing and more constructive note, You can work around this limitation by having a way to import the image directly in the markdown file, like MDX for example. This might not be the answer you looking for, but with default directives coming in a (hopefully) soon version, you at least don't have to specify all the transforms every time. |
Beta Was this translation helpful? Give feedback.
-
Hi Jonas :-)
So, here is MY most pressing use case at the moment for image processing...not sure if this is possible to handle currently in image-tools, so please let me know :-)
I have a bunch of markdown files with frontmatter where an image path (or two, or three) is/are defined:
Then in the svelte component I iterate through all the markdown files frontmatter, like so:
...where the
image={image}
is what I want to process with image-tools.Specifically, I want all the images that get looped over from all the markdown files to be processed the same way using image-tools.
so...is that currently possible using image-tools?
and if yes.........how?
and if no........would it be possible?
Thanks Jonas! XD
Beta Was this translation helpful? Give feedback.
All reactions