Skip to content
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

Does eleventy-img have a callback for each transformation? #248

Open
Nooshu opened this issue Oct 5, 2024 · 0 comments
Open

Does eleventy-img have a callback for each transformation? #248

Nooshu opened this issue Oct 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Nooshu
Copy link

Nooshu commented Oct 5, 2024

The plugin is working extremely well, thanks so much for all your hard work! It's so much easier to use the standard Markdown for inserting images into blog posts.

I'd like to be able to edit the outputted HTML before it gets output to the page. I plan to wrap the <picture> element in a <figure> and insert a <figcaption> as well.

There may already be a way to do this? If so, then this issue can likely be closed!

My idea was to have a callback that is called for every transformation and the data passed into the callback would be the transformed HTML, which could then be manipulated using standard string manipulation etc. This would modify the HTML for every <picture> element before it is rendered to the page.

Is there an easier option than this already available?

@zachleat zachleat added the enhancement New feature or request label Dec 20, 2024
@zachleat zachleat modified the milestone: Eleventy Image v6.0.0 Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants