@morioh/v-lazy

Lazy image loading directive for Vue.js

Usage no npm install needed!

<script type="module">
  import moriohVLazy from 'https://cdn.skypack.dev/@morioh/v-lazy';
</script>

README

Lazy image loading directive for Vue.js

Install

npm install @morioh/v-lazy

import { createApp } from "vue";
import Lazy from '@morioh/v-lazy'

// global register
const app = createApp(App)  
  .use(store)
  .use(router)  
  .use(Lazy)
  .mount("#app");

<img class="placeholder" v-lazy="https://unsplash.com/photos/al1bUu7EfAQ/download?force=true&w=1920">