A JavaScript Image Editor for your Website

High-performance cropping, flipping, rotating, resizing, and transforming of images.

Purchase Learn more
pqina.nl/doka

Everything you expect from an image cropper

Doka packs everything you could need when cropping images, because of its beautiful device agnostic design it fits in everywhere.

That's not all…

  • Render fullscreen, in a modal, in page, or on top of an other image
  • Loads files, URLs, dataURLs, canvas and image tags
  • Can edit, transform, and save SVGs
  • Automatically corrects photo orientation
  • Can copy JPEG EXIF data to output image
  • Fullscreen and in-page edit mode
  • Performant on older devices
  • Compress jpeg files
  • Easily integrate with third party libraries
  • Change locale of all labels
  • Enable or disable controls
  • Change output file type
  • Customize aspect ratio dropdown options
  • Load images by dropping files on editor

Example implementation

Doka is the perfect companion for editing profile pictures, social media content, photo albums, or any other web-based use case that requires image editing.

moon.base/neil#edit

Easily integrate Doka with your project

Doka weighs around 30 Kb gzipped, is written in native JavaScript (it includes a TypeScript definition file), and has zero dependencies, therefore, it can be combined with any framework or library. Whether your project is based on React, Angular, Vue, jQuery, or something else, as long as it's based on JavaScript, Doka will fit right in.

Compatible with a wide range of browsers and devices

Doka is compatible with browsers going back as far as Internet Explorer 11 and performs fine on older Android and iOS devices as well. Check the list below to make sure Doka runs on the most common browsers used by your target audience.

Desktop

  • Chrome latest
  • Firefox latest
  • Opera latest
  • Microsoft Edge 12+
  • Safari 9+ Mac
  • Internet Explorer 11

Mobile

  • Safari 9+ iOS
  • Chrome Android
  • Firefox Android

Integration with familiar File Upload libraries

The Doka API is set up to integrate beautifully with all kinds of file upload solutions. Whether you're using FilePond, Dropzone, Uppy or jQuery File Upload, installation will be a breeze.

The product package includes example integrations and helper functions for all the plugins above.

JavaScript

// We create a Doka editor instance. Now we can use this instance
// to load file objects, it will automatically open them fullscreen
const doka = Doka.create({
  cropAspectRatioOptions: [
    { label: 'Free', value: null },
    { label: 'Portrait', value: 1.25 },
    { label: 'Landscape', value: .75 }
  ]
});

// Listen for changes on a file input element
const input = document.querySelector('input[type="file"]');
input.addEventListener('change', e => {

  // Edit the loaded file with Doka
  doka.edit(input.files[0])
    .then(({ file }) => {
      // "file" is the transformed file object
    });

});

FilePond

// With FilePond we do the actual file transformation outside
// of Doka, as that allows for faster image previews
FilePond.registerPlugin(
  FilePondPluginImageExifOrientation,
  FilePondPluginImagePreview,
  FilePondPluginImageEdit,
  FilePondPluginImageCrop,
  FilePondPluginImageResize,
  FilePondPluginImageTransform
);

FilePond.create(document.querySelector('input'), {

  // Set the Doka editor as editor to use
  imageEditEditor: Doka.create({
    cropAspectRatioOptions: [
      { label: 'Free', value: null },
      { label: 'Portrait', value: 1.25 },
      { label: 'Landscape', value: .75 }
    ]
  })

  // Set other FilePond properties here
  server: '/post'

});

Dropzone

// Create a Doka Dropzone, the "useDokaWithDropzone" function automatically
// creates a "transformFile" function for use of Doka with Dropzone
Dropzone.options.dokaDropzone = {

  // Link up Dropzone with Doka using our custom "transformFile" function
  transformFile: useDokaWithDropzone({
    cropAspectRatioOptions: [
      { label: 'Free', value: null },
      { label: 'Portrait', value: 1.25 },
      { label: 'Landscape', value: .75 }
    ]
  }),

  // Set other Dropzone properties here
  url: '/post'

};

Uppy

// Create a Doka Uppy, the "useDokaWithUppy" function automatically
// creates a "onBeforeFileAdded" function for use of Doka with Uppy
const uppy = Uppy({

  // Link up Uppy with Doka using our custom "onBeforeFileAdded" function
  onBeforeFileAdded: useDokaWithUppy({
    cropAspectRatioOptions: [
      { label: 'Free', value: null },
      { label: 'Portrait', value: 1.25 },
      { label: 'Landscape', value: .75 }
    ]
  }),

  // Set other Uppy properties here
  id: 'uppy'

});

jQuery File Upload

// Link up a Doka and jQuery File Upload, the "useDokaWithJQueryFileUpload" function automatically
// adds a doka processQueue action to use Doka with jQuery File Upload
useDokaWithJQueryFileUpload({
  cropAspectRatioOptions: [
    { label: 'Free', value: null },
    { label: 'Portrait', value: 1.25 },
    { label: 'Landscape', value: .75 }
  ]
});

$('#fileupload').fileupload({

  // We'll disable image resizing, Doka will handle that
  disableImageResize: true,
  previewMaxWidth: 100,
  previewMaxHeight: 100,
  previewCrop: true,

  // Set other jQuery File Upload properties here...
  url: '/post'

});

A word from our customers

PQINA serves over 7000 customers and is rated a 4.9 out of 5 stars based on 400+ customer reviews

Package & pricing

After purchasing Doka you receive a unique license key and a package containing the license and library files. See the file tree below for a full overview of the package contents.

  • license.pdf
  • readme.md
  • changelog.md
  • bin/
    • doka.min.css
    • doka.min.js
    • doka.esm.min.js
    • doka.esm.min.d.ts
  • sample/
    • file-input
    • dropzone
    • filepond
    • jquery-file-upload
    • uppy

License options

Sign up for Doka starting from $79/year to receive all the latest features and updates as well as top-notch, personal support.

Should you decide not to renew your yearly subscription you may continue to use your version of Doka for life, but will receive no further updates.

  • Basic

    $79 year

    • 1 domain

      Unlimited subdomains

    • Personal support
    • Latest product version
    • 30-day money-back guarantee
  • Bundle

    $239 year

    • 5 domains

      Unlimited subdomains

    • Personal support
    • Latest product version
    • 30-day money-back guarantee
  • Pro

    $749 year

    • 20 domains
    • Use in SaaS, mobile app, and intranet solutions
    • Priority support
    • Latest product version
    • 30-day money-back guarantee

If you want to use Doka in your distributed products, embedded systems, or have other interesting plans that the default license doesn’t cover, please contact us at [email protected] to get started.

Customer questions & answers

Requesting a refund

30-day money-back guaranteed for any purchase under the conditions detailed in the License Agreement.

Contacting support

All licenses include support as long as the subscription has not expired. Use the support form to submit a ticket. If your license has expired, please renew the license to receive further support.

Payment options

Transactions are handled by Gumroad. The Gumroad store accepts credit cards or PayPal. For more information read the Gumroad FAQ entry on payment methods

Cancelling the subscription

When you cancel your subscription you may continue to use your current version of Doka for life, but will receive no further updates or support after the yearly term has ended.

Generating an invoice

You'll find a link to generate an invoice in the purchase confirmation email. For more information read the Gumroad FAQ entry on invoices

VAT

VAT is automatically handled by Gumroad. If you have a VAT ID you can enter it on your invoice, if you're not required to pay VAT, Gumroad will automatically issue a refund.

Other questions?

Feel free to contact us directly at [email protected]