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

Eleventy Transform: allow overriding settings on a per-image basis #277

Open
valadaptive opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@valadaptive
Copy link

I have some thumbnails that I can get away with a lower quality setting on, but also a lot of full-size images and UI screenshots that I want to look nicer. There doesn't currently appear to be a way to set things like quality on a per-image basis without using a shortcode for all my images (which is a bit annoying since I don't know how many template engines support things like named arguments, and there are a lot of image attributes I may want to add).

I could see a couple ways of implementing this: some sort of hook in the plugin settings itself that gives access to the <img> element's attributes (either in addition to transform or as an additional argument to it), or a custom eleventy:settings attribute on the element itself. Not too sure about the exact shape of either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant