Skip to content

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

License

Notifications You must be signed in to change notification settings

magic-modules/picture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 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

...

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published