> For the complete documentation index, see [llms.txt](https://matteo-gabriele.gitbook.io/vue-progressive-image/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://matteo-gabriele.gitbook.io/vue-progressive-image/get-started.md).

# Get started

Plugin for Vue that lazyload images out of the box and helps give immediate feedback to the user while content is loading.

### Install

{% hint style="warning" %}
Requires Vue 3 installed
{% endhint %}

{% hint style="info" %}
ESM-only package
{% endhint %}

```
npm add vue-progressive-image
```

### Add plugin locally

```javascript
// main.js
import { createApp } from "vue";
import App from "./App.vue";
import "vue-progressive-image/dist/style.css"; // <--- very important!

createApp(App).mount("#app");
```

```html
<script setup>
import { ProgressiveImage } from "vue-progressive-image";
</script>

<template>
  <ProgressiveImage src="https://picsum.photos/id/1080/1980/1080" />
</template>
```

### Add plugin globally

```javascript
// main.js
import { createApp } from "vue";
import App from "./App.vue";
import "vue-progressive-image/dist/style.css"; // <--- very important!
import VueProgressiveImage from 'vue-progressive-image'

createApp(App).use(VueProgressiveImage).mount("#app");
```

```html
<template>
  <ProgressiveImage src="https://picsum.photos/id/1080/1980/1080" />
</template>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://matteo-gabriele.gitbook.io/vue-progressive-image/get-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
