saneef / eleventy-plugin-img2picture

Eleventy plugin to replace <img> using <picture> with resized and optimized images.
MIT License
22 stars 2 forks source link

Can't not have an alt text #21

Closed ItsEthanH closed 1 year ago

ItsEthanH commented 1 year ago

Hello!

First off - amazing plugin. No other gives such fine-grained control over the image output while also being so easy to use.

However, the only thing I haven't been able to do is to pass a value on the img tag to get an alt="" to render.

There are some valid reasons for this - decorative or background images don't need alt text. I've tried passing alt="", alt=" " and looked through the docs for a data- attribute, but all methods still give me validation errors.

Ideally, I'd be able to use a data- attribute or pass alt="" and have alt="" returned (the latter returns alt on it's own, which Google doesn't like).

Let me know if I can provide more info :)

saneef commented 1 year ago

Look like a bug.

Thanks for reporting.

Will work on it soon.

saneef commented 1 year ago

This is fixed in v4.1.1.