eleventy-img
eleventy-img copied to clipboard
Eleventy Transform: Use existing width attribute, if set
It's really neat how the eleventyImageTransformPlugin
will automatically enhance img tags.
If an img tag already has a width
attribute set, it would be helpful if the plugin used that value instead of requiring users to rename the attribute to eleventy:widths
.
Example:
<img src="foo.jpg" width="600">
will return the full sized image. The transform plugin silently drops the width parameter. This is confusing and perhaps not what people expect (at least not what I expect).
<img src="foo.jpg" eleventy:widths="600">
fixes it.