浏览代码

Add Image Editor post draft

Artur Paikin 4 年之前
父节点
当前提交
070365cd64

+ 40 - 0
website/src/_posts/2020-07-1.18-image-editor.md

@@ -0,0 +1,40 @@
+---
+title: "Image Editor 🌈"
+date: 2020-07-21
+author: arturi
+image: "https://uppy.io/images/blog/1.18-image-editor/image-editor-dashboard.jpg"
+published: false
+---
+
+One of the most-requested Uppy features, the Image Editor, is live now (in beta) in 1.18.
+
+<video alt="Demo video showing Uppy with Image Editor plugin — cropping, rotating and resizing images" muted autoplay loop>
+  <source src="/images/blog/1.18-image-editor/image-editor-demo.mp4" type="video/mp4">
+</video>
+
+The editor currently supports cropping, resizing, rotating, flipping and zooming your images in and out. You can try it out on [the Dashboard example page](/examples/dashboard/).
+
+Under the hood we are using the excellent open source (just like Uppy itself) [Cropper.js](https://fengyuanchen.github.io/cropperjs/) library.
+
+```sh
+npm install @uppy/image-editor
+```
+
+```js
+const Uppy = require('@uppy/core')
+const Dashboard = require('@uppy/dashboard')
+const ImageEditor = require('@uppy/image-editor')
+
+const uppy = Uppy()
+uppy.use(Dashboard)
+uppy.use(ImageEditor, { 
+  target: Dashboard,
+  quality: 0.8 // for the resulting image, 0.8 is a sensible default
+})
+```
+
+![Uppy with Image Editor plugin screenshot — cropping, rotating and resizing images](https://uppy.io/images/blog/1.18-image-editor/image-editor-dashboard.jpg)
+
+The Image Editor plugin is meant to be used with the Dashboard UI, but in theory it can work without it, rendered somewhere else. This has not been tested, try at your own risk ;-)
+
+You can [override the options from Cropper.js](https://uppy.io/docs/image-editor/#cropperOptions), too. Check out [the docs for up to date options and events](https://uppy.io/docs/image-editor).

二进制
website/src/images/blog/1.18-image-editor/image-editor-dashboard.jpg


二进制
website/src/images/blog/1.18-image-editor/image-editor-demo.mp4