adapttive / remark-image-optimize

Native lazy loading, class and style attributes with cloudinary optimizations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@adapttive/remark-image-optimize

Native lazy loading, class and style attributes with cloudinary optimizations.

Options

{
    loading: "auto", // "lazy" | "eager"
    cloudinary: {
        format: {
            enable: true,
            convert: "webp",
            extensions: "*" // [".png", ".jpeg", ".jpg"]
        },
        quality: {
            enable: true,
            params: "f_auto,q_auto,w_auto,dpr_auto",
        },
        alt: {
            enable: false
        },
        copyright: {
            enable: true,
            text: "©%20adapttive.com"
        }
    },
    css: {
      img: {
        style: "width:500px;height:600px;",
        className: "image"
      },
      p: {
        style: "width:500px;height:600px;",
        className: "para"
      }
    }
}

Check usage.js for example code.

About

Native lazy loading, class and style attributes with cloudinary optimizations.

License:MIT License


Languages

Language:JavaScript 100.0%