lowdown icon indicating copy to clipboard operation
lowdown copied to clipboard

default `loading="lazy"` on `<img>` output

Open jleightcap opened this issue 6 months ago • 1 comments

This is a somewhat major performance feature for HTML rendering in practice. Although there are certainly cases where you want to eagerly load images (logos, headers), the significant majority use benefits from the lazy loading of images which are distributed throughout the document.

There doesn't seem to be an existing mechanism for controlling this kind of attribute on tags, this PR just sets it as a default.

jleightcap avatar Jul 04 '25 04:07 jleightcap

I don't want -thtml (or any mode) to output global overrides to format defaults like this. However, is there a way in other markdown formatters to effect this, like using tag attributes (e.g., { .home #link2 } for the home class and link2 identifier)?

kristapsdz avatar Nov 05 '25 21:11 kristapsdz