# quill-plugin-image-upload

> a plugin for uploading image in Quill

Latest version **0.0.6** (published 2018-11-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install quill-plugin-image-upload
pnpm add quill-plugin-image-upload
yarn add quill-plugin-image-upload
bun add quill-plugin-image-upload
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-11-29 |
| First published | 2018-11-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 36 |
| Maintainers | wangdagen |
| Keywords | quill, image, upload, uploader, src |

## Links

- npm: https://www.npmjs.com/package/quill-plugin-image-upload
- Repository: https://github.com/dragonwong/quill-plugin-image-upload
- Homepage: https://github.com/dragonwong/quill-plugin-image-upload#readme
- Issues: https://github.com/dragonwong/quill-plugin-image-upload/issues
- npm.io page: https://npm.io/package/quill-plugin-image-upload

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2018-11-29
- 0.0.5 — 2018-11-20
- 0.0.4 — 2018-11-20
- 0.0.3 — 2018-11-20
- 0.0.2 — 2018-11-19
- 0.0.1 — 2018-11-19

## README

# quill-plugin-image-upload

A plugin for uploading image in Quill 🌇

- 🌟 upload a image when it is inserted, and then replace the base64-url with a http-url
- 🌟 preview the image which is uploading with a loading animation
- 🌟 when the image is uploading, we can keep editing the content including changing the image's position or even delete the image.

![](https://user-images.githubusercontent.com/2622602/49206584-73c6b080-f3ed-11e8-8164-aad28508d4c4.gif)

## Install

```bash
npm install quill-plugin-image-upload --save
```

## Start

```js
import Quill from 'quill';
import 'quill/dist/quill.snow.css';
import imageUpload from 'quill-plugin-image-upload';

// register quill-plugin-image-upload
Quill.register('modules/imageUpload', imageUpload);

new Quill('#editor', {
  theme: 'snow',
  modules: {
    toolbar: [
     'image'
    ],
    imageUpload: {
      upload: file => {
        // return a Promise that resolves in a link to the uploaded image
        return new Promise((resolve, reject) => {
          ajax().then(data => resolve(data.imageUrl));
        });
      }
    },
  },
});
```

## Demo

```bash
cd demo
npm install
npm start
```

---
_Source: https://npm.io/package/quill-plugin-image-upload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
