-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programmatic approach to use @sveltejs/enhanced-img
in markdown
#11132
Comments
I don't see the If you wrote a plugin for |
I've been looking for a workaround on this very issue. I have a working solution for images within the content of a markdown file, and I am currently looking for a solution for images specified in the frontmatter. For some context, I am using Remark
Rehype
Modifying
|
Updated in the issue and it's here: https://github.com/LukaHarambasic/harambasic.de/blob/main/src/routes/posts/%5Bslug%5D/Entry.svelte#L38
@ryansheehan |
<enhanced:img />
in @sveltejs/enhanced-img
@sveltejs/enhanced-img
in markdown
The https://www.npmjs.com/package/mdsvex-enhanced-images plugin will make MDsveX process normal Markdown images using enhanced-images. Prior art: |
Describe the problem
I would like to also improve images in markdown, therefore I use remark/rehype and inject a custom plugin to replace the
img
tag with<enhanced:img />
(see here). The HTML generated that way than gets used via{@html html}
(see here).The modified version (
<enhanced:img />
) than gets added to the DOM, so it sveltekit doesn't know that it has to do some magic.Describe the proposed solution
I see two options:
Alternatives considered
No response
Importance
would make my life easier
Additional Information
PS: When I use it as described in the docu for the more basic use case it works as expected and I love it!!
The text was updated successfully, but these errors were encountered: