1.0.1 • Published 3 years ago

@leeda2217/smart-image v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

3 years ago

1.0.0

3 years ago