Skip to content

leeda2217/smart-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smart-image

An image element that automatically recovers a failed image on an unstable network using a custom element.

How to use

import

import 'smart-image'

attributes

  • src: image resource
  • fit: same as object-fit (Optional)
  • position: same as object-position (Optional)
  • lazy: start loading when the image is inside the viewport (Optional)
<smart-image fit="cover" position="center" src="https://avatars.githubusercontent.com/u/80738866?v=4"/>

Lazy Loading

<smart-image fit="cover" position="center" src="https://avatars.githubusercontent.com/u/80738866?v=4" lazy />

About

An image element that automatically recovers a failed image on an unstable network using a custom element.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published