@unpic/vue

Vue component for responsive, high-performance images.
110,580 2,093
Install
npm install @unpic/vue
Latest Version:1.0.0
Vue:3
License:MIT
Last Updated:Oct 20, 2026
Links: GitHub  ·  npm
Maintainer: ascorbic

tree

@unpic/vue

Vue component for responsive, high-performance images. Generates a responsive <img> tag that follows best practices, with the correct srcset, sizes and styles. Detects image URLs from most image CDNs and CMSs and can resize images with no build step.

Features

  • Just an <img> tag! No extra elements, no runtime JavaScript. Easy to style.
  • Automatically generates correct srcset and sizes attributes for responsive images
  • Handles responsive resizing of images, preserving aspect ratio
  • Uses native lazy loading and aync decoding for offscreen images
  • Handles different image layouts: fixed, constrained and full width
  • Uses eager loading and high priority fetching for important images
  • Delivers modern image formats, including WebP and AVIF if supported by your browser
  • No built step or server-side rendering required: uses your existing image CDN or CMS, with no additional configuration
  • Uses unpic to support most image CDNs, including Cloudinary, Imgix, and Shopify
  • Can generate a low-res background image for a blurred placeholder effect

Installation and usage

npm install @unpic/vue
<script setup lang="ts">
import { Image } from "@unpic/vue";
</script>

<template>
  <Image
    src="https://cdn.shopify.com/static/sample-images/bath_grande_crop_center.jpeg"
    layout="constrained"
    width="800"
    height="600"
    alt="A lovely bath"
  />
</template>

For the supported props, see the docs.

Related Packages

vue-images

A simple lightbox component for displaying an array of images

2,612 209
vue-lazy-images

A plugin of lazy-load images for vue2.x

1,709
v-img

Vuejs plugin for image viewing

61,736 406
vue-responsive-image

A Vue component to manage responsive images

7,273 58
v-photoswipe

Vue plugin for image preview base on PhotoSwipe

126,862 32

Version History

Version Released License
1.0.0 MIT
0.0.51 MIT
0.0.50 MIT
0.0.48 MIT
0.0.47 MIT