Skip to content

Latest commit

 

History

History
69 lines (50 loc) · 1.91 KB

README.md

File metadata and controls

69 lines (50 loc) · 1.91 KB

@magic-modules/picture

this is the @magic-modules Picture component.

wraps <picture> to load modern image formats with fallbacks to jpg|png|gif.

NPM version Linux Build Status Windows Build Status Coverage Status Greenkeeper badge Known Vulnerabilities

install:

npm install --save-exact @magic-modules/picture

usage:

Markdown:
<Picture name="image" ext="jpg"></Picture>
Javascript:

below is the javascript usage with the default arguments

export const View = () => {
  Picture({
    name: 'image', // required!
    ext: 'jpg',
    avif: true,
  })
}

changelog

0.0.1

first release.

0.0.2
  • update dependencies
  • lazy is a boolean now.
  • swc will now correctly prefill WEB_ROOT for img src and source srcset
0.0.3 - unreleased

...