UNPKG

@imgflow/vue

Version:

Vue 3 responsive <Picture> component using vite-imagetools & LQIP, no CDN

34 lines (26 loc) 557 B
# @imgflow/vue Vue 3 `<Picture>` component for build-time optimized responsive images using `vite-imagetools` and LQIP placeholders. ## Installation ```bash npm install @imgflow/vue ``` ## Usage ```js import { createApp } from 'vue' import App from './App.vue' import ImgflowVue, { Picture } from '@imgflow/vue' const app = createApp(App) app.use(ImgflowVue) ``` ### In your Vue components ```vue <template> <Picture src="./assets/photo.jpg" :widths="[300,600,1200]" formats="webp,avif" lqip alt="My photo" /> </template> ```