hello,
How can I add decoding=“async” attribute to all img? Is there a plugin or other way to do this?
example:
<img decoding="async" src="/img.jpg" alt="">
hello,
How can I add decoding=“async” attribute to all img? Is there a plugin or other way to do this?
example:
<img decoding="async" src="/img.jpg" alt="">
I imagine you are talking about how to add attributes with markdown syntax, something like that should work:
{: decoding="async"}
thx, but I meant a way to insert it automatically, like the loading=lazy
attribute in the plugin jekyll-loading-lazy
Well if that plugin is working for you, just rework it…
tags.each { |tag| tag["loading"] = "lazy" unless tag["loading"] }
this one:
tags.each { |tag| tag["decoding"] = "async" unless tag["decoding"] }
it should work!