Image editor for jQuery uploading widget
- We’re building the next version of Cloud Image Editor. Check it out.
Editing images right in a browser is the closest path for your app to receive better images. And those, in turn, provide higher engagement rates and conversions. The quality of visuals becomes an even greater concern when you want to perfect images sent by your users before they get to your site or app.
Uploadcare features a custom tab for the Uploading Widget v3 that allows enhancing and editing images in any browser, mobile included. The tab is called Effects Tab.
There are nine on-the-fly effects you can apply right in the Uploading Widget UI: crop, rotate, enhance, sharpen, blur, mirror, flip, grayscale, and invert.
You can configure which effects are enabled and change the tab behavior in other ways.
How it works
Image operations available for applying in the Uploading Widget dialog are based on our Image processing features. Effects Tab outputs a CDN URL holding image UUIDs and operations applied by a user while editing in form of URL directives. You can learn more about our available image processing operations here.
Technically, every image first gets to your Uploadcare project. Then we show an image preview in the Uploading Widget dialog via a CDN URL provided on file upload. When a user applies image processing operations, we inject the corresponding URL directives. Once the editing is complete, Effect Tab outputs the new CDN URL which includes all the applied operations.
For example, if a user chose to apply
grayscale and clicked
here is what we will get in the output:
preview operation will appear in the output URL by default due to
the image processing operation limitations.
In-browser image editing is carried out via a custom Uploading Widget tab called Effects Tab.
The only requirement is integrating Uploadcare Uploading Widget before using Effects Tab.
Choose from the install methods listed below.
Get Effects Tab:
npm i uploadcare-widget-tab-effects --save
Import the tab it in your module:
You can either install the minified Effects Tab version:
<script src="https://ucarecdn.com/libs/widget-tab-effects/1.x/uploadcare.tab-effects.min.js" charset="utf-8"></script>html
Or go with a bundled version without minification:
<script src="https://ucarecdn.com/libs/widget-tab-effects/1.x/uploadcare.tab-effects.js" charset="utf-8"></script>html
Start using Effects Tab by adding it to your Uploading Widget:
There are multiple ways to configure the set of effects enabled in Effects Tab.
You can either go with a string holding coma-separated effect names:
<script> UPLOADCARE_EFFECTS = 'blur,sharp,grayscale' </script>html
or use another approach:
<script> UPLOADCARE_EFFECTS = ['blur', 'sharp', 'grayscale'] </script>html
The set of enabled effects for a specific Uploading Widget instance can be controlled
<input type="hidden" role="uploadcare-uploader" name="content" data-effects="blur,sharp,grayscale" />html
Following the Uploading Widget concept, the allowed effects can be provided as the
This allows you to configure the set of enabled effects. It also controls
the order of effects in the tab: however,
crop will always placed first in
effects can either be a string holding one or more comma-separated effects or
an array of strings, JS only. You can also enable all effects
by setting the option to
crop, crops images freely or using set aspect ratios
rotate, rotates images
mirror, provides image-mirroring capabilities
flip, allows flipping images
blur, filters images via Gaussian Blur
sharp, allows adjusting image sharpness
enhance, makes images look better via auto levels, auto contrast, and saturation sharpening
grayscale, desaturates images
invert, inverts image colors
You can choose one of the existing tab locales or contribute a new one. This can be done by forking the main repository followed by adding a new localization file to the list.