blurry-dev / blurry

A static site generator focused on page speed and SEO
https://blurry-docs.netlify.app/
MIT License
18 stars 1 forks source link

Adding html image throws exception #46

Closed KajKandler closed 8 months ago

KajKandler commented 11 months ago

Use Case: Styling an image separately from default

In order to style an image differently from a default style I insert an HTML block into the markdown like this

# Example Headline

<figure>
    <picture>
        <img alt="My Alt Text" style="width: 100%; height: auto; margin: 0 auto;" src="/images/my-image.png">
    </picture>
    <figcaption>An Image</figcaption>
</figure>

This throws an exception, because it can't delete the attribute loading="lazy" from the image. Adding the attribute to the <img> tag solves the problem, but such workaround should not be necessary.

KajKandler commented 11 months ago

Another helpful addition would be the ability to add a class or id attribute to the html for images, so one can use CSS to style individual images.