DevForth

Painterro, a simple JS paint plugin for your website

Painterro is a small open-source image editor for the browser. Paste a screenshot, crop it, add arrows and text, and save it to your own backend.

Ivan Borshchov
Ivan Borshchov
CEO & System Architect @ DevForth
Painterro, a simple JS paint plugin for your website
Painterro, a simple JS paint plugin for your website

Sometimes your users need to fix a picture before they send it: crop a screenshot, circle a bug, hide an email address. Sending them off to a separate image editor is slow. Painterro puts a small editor right inside your page.

We made it as an open-source library. It's plain JavaScript with no dependencies, so it works in a React, Vue or Angular app as well as on a plain HTML page.

What your users can do with it:

  • Paste a screenshot with Ctrl+V, drop in a file, or open one.
  • Crop, resize and rotate.
  • Draw lines, rectangles, ellipses and arrows, or draw freehand with a brush.
  • Add text.
  • Pixelate part of the image to hide private data.
  • Undo with Ctrl+Z.

Most tools have a one-key shortcut (C crops, for example). Hover over a button to see its key.

Add it to your app

npm install painterro
import Painterro from 'painterro'

Painterro({
  saveHandler: (image, done) => {
    const form = new FormData()
    form.append('image', image.asBlob())
    fetch('/api/images', { method: 'POST', body: form })
      .then(() => done(true))
  },
}).show()

Painterro doesn't decide where images go. You give it a saveHandler, it hands you the image as a Blob or a data URL, and you send it to your own backend. done(true) closes the editor.

Options let you change the colours, hide toolbar buttons (hiddenTools) and switch the language (language). The README on GitHub lists all of them, including a colorScheme for a dark look, and links to a live demo.

In short: run npm install painterro, call Painterro({ saveHandler }).show(), and your users can edit images without leaving your site.

Get your project quote

Free result within 48-72 hours

Related insights