Skip to content

Repository files navigation

@magic-modules/picture

this is the @magic-modules Picture component.

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

NPM versionLinux Build StatusWindows Build StatusCoverage StatusGreenkeeper badgeKnown Vulnerabilities

install:

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

usage:

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

below is the javascript usage with the default arguments

exportconstView=()=>{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

...

About

@magic Picture module. Wraps <picture> to load modern image formats with fallbacks to older formats.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages