Implementing Syncfusion Vue Image Editor
The Syncfusion Vue Image Editor is a comprehensive, feature-rich component for editing images directly in your Vue 3 applications. It provides an intuitive interface with powerful tools for transformations, annotations, effects, and more.
Component Overview
The Image Editor combines a canvas-based editing environment with a comprehensive toolbar and contextual tools. It supports:
- Multiple Input Sources: Files, URLs, base64, blobs, file managers, treeviews
- Rich Annotation Support: Text (with styling), shapes, freehand drawings, watermarks
- Professional Effects: Filters and fine-tuning controls
- Advanced Operations: Z-order management, redaction, frame decoration
- Accessibility First: Full keyboard navigation, WCAG compliance, RTL support, 120+ localization keys
- Flexible Integration: Standalone or within dialogs, with customizable toolbars
Documentation and Navigation Guide
🔹 API Reference
📄 Read: references/api.md
- Complete API documentation with all properties, methods, and events
- Properties overview (core, toolbar, settings)
- Methods for image operations, transformations, annotations
- Events for lifecycle, interactions, effects, and toolbars
- Enums and type definitions (ArrowheadType, FrameType, RedactType, etc.)
- Complete working examples with verified method signatures
Getting Started
📄 Read: references/getting-started.md
- Installation with Vite and create-vue
- CSS imports and theme setup
- Basic component initialization
- Setting width, height, and initial rendering
Opening and Saving Images
📄 Read: references/opening-saving-images.md
- Open from file paths, URLs, base64 strings, blobs
- Open from file uploader, file manager, and treeview
- Save/export as PNG, JPEG, SVG, WEBP
- Image dimensions and aspect ratio control
- File opened, saving, and lifecycle events
Selection and Cropping
📄 Read: references/selection-cropping.md
- Insert custom, square, and circle selections
- Crop with aspect ratios (2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 5:7, 7:5, 9:16, 16:9)
- Crop method and selection events
- Maintain original image size during cropping
- Lock selection area during resizing
Transform: Rotate, Flip, and Straighten
📄 Read: references/transform-rotate-flip.md
- Rotate clockwise/counter-clockwise by degrees
- Flip horizontally and vertically
- Straighten images with fine degree adjustments (-45° to +45°)
- Transform annotations along with image
- Rotating and flipping events
Zoom and Pan Operations
📄 Read: references/zooming-panning.md
- Zoom in/out with configurable min/max factors
- Pan when zoomed or during cropping
- Zoom triggers (toolbar, pinch, mouse wheel, keyboard)
- Zooming and panning events
- Zoom point calculations
Text Annotations
📄 Read: references/text-annotations.md
- Add text with position, content, and font settings
- Text styling (bold, italic, underline, strikethrough)
- Font families, sizes, and colors
- Multiline text with newline characters
- Delete text annotations
- Customize font color via shapeChanging event
Freehand Drawing
📄 Read: references/freehand-drawing.md
- Enable/disable freehand drawing mode
- Customize stroke width and color
- Delete freehand annotations
- Adjust stroke during drawing via shapeChanging event
Shape Annotations
📄 Read: references/shape-annotations.md
- Draw rectangles, ellipses, lines, arrows, and paths
- Customize shapes with stroke color, stroke width, and fill color
- Rotate shapes with degree parameter
- Delete shape annotations
- Customize default stroke colors
- Shape changing and customization events
Image Annotations
📄 Read: references/image-annotations.md
- Add images or icons as annotations
- Control position, size, rotation, and opacity
- Aspect ratio preservation
- Watermarks and decorative elements
Filters
📄 Read: references/filters.md
- Apply predefined filters (Chrome, Cold, Warm, Grayscale, Sepia, Invert)
- Image filtering event
- Reset filter to original
Fine-Tuning
📄 Read: references/finetune.md
- Adjust brightness, contrast, saturation
- Control hue, exposure, blur, opacity
- Finetune value changing events
- Real-time adjustments with sliders
Undo and Redo
📄 Read: references/undo-redo.md
- Undo/redo operations with 16-step history
- Keyboard shortcuts (Ctrl+Z, Ctrl+Y)
- History management and limits
Toolbar Customization
📄 Read: references/toolbar-customization.md
- Built-in toolbar items (20+ default tools)
- Add, remove, enable, disable toolbar items
- Custom toolbar items with event handlers
- Contextual toolbar for annotations
- Toolbar templates for complete customization
- Toolbar created and item clicked events
Quick Access Toolbar
📄 Read: references/quick-access-toolbar.md
- Quick access toolbar for annotations
- Show/hide quick access toolbar
- Add custom items to quick access toolbar
- Quick access toolbar open event
Resize Image
📄 Read: references/resize-image.md
- Resize with or without aspect ratio
- Width and height parameters
- Resizing event with before/after dimensions
Frame Decoration
📄 Read: references/frame-decoration.md
- Apply frames (Mat, Bevel, Line, Inset, Hook)
- Customize frame color, size, and line style
- Frame changing event
Z-Order Layering
📄 Read: references/z-order-layering.md
- Bring forward/send backward annotations
- Bring to front/send to back
- Manage annotation layer order
Redact Sensitive Information
📄 Read: references/redact-sensitive-info.md
- Blur sensitive areas
- Pixelate sensitive information
- Redact CRUD operations (select, update, delete, get)
- Privacy and compliance
Accessibility and Localization
📄 Read: references/accessibility-localization.md
- WCAG 2.2, Section 508 compliance
- Screen reader support
- Keyboard shortcuts (Ctrl+Z, Ctrl+S, Ctrl+O, Delete, Enter, Escape)
- RTL language support
- Localization with 120+ locale keys
Image Restrictions and Validation
📄 Read: references/image-restrictions-validation.md
- Allowed file extensions (.jpg, .png, .svg, .webp, .bmp)
- Min and max file size restrictions
- File validation and error alerts
Clear Image
📄 Read: references/clear-image.md
- Clear editor state
- Dialog reuse patterns
- Remove previously loaded images
Fit to Width and Height
📄 Read: references/fit-width-height.md
- Fit image to editor container width
- Fit image to editor container height
- Zoom calculations for perfect fit
Render in Dialog
📄 Read: references/render-in-dialog.md
- Render Image Editor within Dialog component
- Content template integration
- Dialog show/hide patterns
Reset Image
📄 Read: references/reset-image.md
- Reset all modifications to original state
- Restore unmodified version
- Clear annotations and effects
Quick Start Example
<template>
<div id="container">
<ImageEditorComponent
ref="imgObj"
width="550px"
height="350px"
:created="imageEditorCreated"
/>
</div>
</template>
<script setup>
import { ref } from 'vue';
import { ImageEditorComponent } from '@syncfusion/ej2-vue-image-editor';
import { Browser } from '@syncfusion/ej2-base';
const imgObj = ref(null);
const imageEditorCreated = () => {
if (Browser.isDevice) {
imgObj.value?.open('https://ej2.syncfusion.com/vue/documentation/image-editor/images/flower.jpeg');
} else {
imgObj.value?.open('https://ej2.syncfusion.com/vue/documentation/image-editor/images/bridge.jpeg');
}
};
</script>
Common Patterns
Pattern 1: Open + Edit + Save Workflow
- Open image via
open() method
- Apply transformations, annotations, or effects
- Use
export() to save as PNG/JPEG/SVG/WEBP
- Optionally convert to base64 or blob for backend storage
Pattern 2: Responsive Toolbar
- Define custom toolbar items in
toolbar property
- Handle clicks via
@toolbarItemClicked event
- Execute methods like
rotate(), zoom(), drawText() based on clicked item
- Update contextual toolbar via
@toolbarUpdating event
Pattern 3: Annotation Workflow
- Enable annotation mode (freehand, text, shape)
- Customize via
@shapeChanging event (color, stroke, font)
- Delete via
deleteShape() with shape ID
- Manage layers via z-order methods
Pattern 4: Dialog Integration
- Render Image Editor in Dialog's
content template
- Load image when dialog opens via
@fileOpened event
- Call
clearImage() before closing dialog
- Retrieve edited image data via
export() or getImageData()
Pattern 5: Filter + Finetune Pipeline
- Apply filter via
applyImageFilter()
- Fine-tune via
finetuneImage() (brightness, contrast, etc.)
- Listen to
@imageFiltering and @finetuneValueChanging events
- Combine effects for professional results
Key Properties
| Property |
Type |
Purpose |
width |
string |
Editor canvas width (e.g., "550px", "100%") |
height |
string |
Editor canvas height (e.g., "350px", "100%") |
toolbar |
array |
Customize toolbar items and visibility |
fontFamily |
object |
Add custom font families |
uploadSettings |
object |
Configure file restrictions (extensions, size) |
zoomSettings |
object |
Set min/max zoom factors |
showQuickAccessToolbar |
boolean |
Show/hide quick access toolbar |
locale |
string |
Set localization (e.g., 'de-DE') |
Key Events
| Event |
Trigger |
Use Case |
@created |
Component initialized |
Load image on startup |
@fileOpened |
Image loaded |
Add watermarks, apply defaults |
@beforeSave |
Before export |
Validate, add metadata |
@cropping |
During crop |
Prevent scaling, lock dimensions |
@zooming |
During zoom |
Validate zoom level |
@rotating |
During rotate |
Track rotation angle |
@shapeChanging |
Annotation modified |
Customize stroke, font |
@toolbarUpdating |
Toolbar rendered |
Add/remove contextual items |
Supported File Formats
Open: PNG, JPEG, JPG, SVG, WEBP, BMP (local, URL, base64, blob)
Save/Export: PNG, JPEG, SVG, WEBP
Next Steps
- Start with getting-started.md for setup
- Explore opening-saving-images.md to understand data flow
- Check specific features in their dedicated reference files
- Use accessibility-localization.md for multi-language support
1---2name: syncfusion-vue-image-editor3description: Master Syncfusion Vue Image Editor for comprehensive image editing. Use this when users need to edit images, add annotations, apply filters, manage layers, or implement image editing features. Supports multiple formats (PNG, JPEG, SVG, WEBP, BMP), annotations (text, shapes, freehand, images), effects (filters, finetune), and accessibility features.4---56# Implementing Syncfusion Vue Image Editor78The Syncfusion Vue Image Editor is a comprehensive, feature-rich component for editing images directly in your Vue 3 applications. It provides an intuitive interface with powerful tools for transformations, annotations, effects, and more.910## Component Overview1112The Image Editor combines a canvas-based editing environment with a comprehensive toolbar and contextual tools. It supports:1314- **Multiple Input Sources:** Files, URLs, base64, blobs, file managers, treeviews15- **Rich Annotation Support:** Text (with styling), shapes, freehand drawings, watermarks16- **Professional Effects:** Filters and fine-tuning controls17- **Advanced Operations:** Z-order management, redaction, frame decoration18- **Accessibility First:** Full keyboard navigation, WCAG compliance, RTL support, 120+ localization keys19- **Flexible Integration:** Standalone or within dialogs, with customizable toolbars2021## Documentation and Navigation Guide2223### 🔹 API Reference24📄 **Read:** [references/api.md](references/api.md)25- Complete API documentation with all properties, methods, and events26- Properties overview (core, toolbar, settings)27- Methods for image operations, transformations, annotations28- Events for lifecycle, interactions, effects, and toolbars29- Enums and type definitions (ArrowheadType, FrameType, RedactType, etc.)30- Complete working examples with verified method signatures3132### Getting Started33📄 **Read:** [references/getting-started.md](references/getting-started.md)34- Installation with Vite and create-vue35- CSS imports and theme setup36- Basic component initialization37- Setting width, height, and initial rendering3839### Opening and Saving Images40📄 **Read:** [references/opening-saving-images.md](references/opening-saving-images.md)41- Open from file paths, URLs, base64 strings, blobs42- Open from file uploader, file manager, and treeview43- Save/export as PNG, JPEG, SVG, WEBP44- Image dimensions and aspect ratio control45- File opened, saving, and lifecycle events4647### Selection and Cropping48📄 **Read:** [references/selection-cropping.md](references/selection-cropping.md)49- Insert custom, square, and circle selections50- Crop with aspect ratios (2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 5:7, 7:5, 9:16, 16:9)51- Crop method and selection events52- Maintain original image size during cropping53- Lock selection area during resizing5455### Transform: Rotate, Flip, and Straighten56📄 **Read:** [references/transform-rotate-flip.md](references/transform-rotate-flip.md)57- Rotate clockwise/counter-clockwise by degrees58- Flip horizontally and vertically59- Straighten images with fine degree adjustments (-45° to +45°)60- Transform annotations along with image61- Rotating and flipping events6263### Zoom and Pan Operations64📄 **Read:** [references/zooming-panning.md](references/zooming-panning.md)65- Zoom in/out with configurable min/max factors66- Pan when zoomed or during cropping67- Zoom triggers (toolbar, pinch, mouse wheel, keyboard)68- Zooming and panning events69- Zoom point calculations7071### Text Annotations72📄 **Read:** [references/text-annotations.md](references/text-annotations.md)73- Add text with position, content, and font settings74- Text styling (bold, italic, underline, strikethrough)75- Font families, sizes, and colors76- Multiline text with newline characters77- Delete text annotations78- Customize font color via shapeChanging event7980### Freehand Drawing81📄 **Read:** [references/freehand-drawing.md](references/freehand-drawing.md)82- Enable/disable freehand drawing mode83- Customize stroke width and color84- Delete freehand annotations85- Adjust stroke during drawing via shapeChanging event8687### Shape Annotations88📄 **Read:** [references/shape-annotations.md](references/shape-annotations.md)89- Draw rectangles, ellipses, lines, arrows, and paths90- Customize shapes with stroke color, stroke width, and fill color91- Rotate shapes with degree parameter92- Delete shape annotations93- Customize default stroke colors94- Shape changing and customization events9596### Image Annotations97📄 **Read:** [references/image-annotations.md](references/image-annotations.md)98- Add images or icons as annotations99- Control position, size, rotation, and opacity100- Aspect ratio preservation101- Watermarks and decorative elements102103### Filters104📄 **Read:** [references/filters.md](references/filters.md)105- Apply predefined filters (Chrome, Cold, Warm, Grayscale, Sepia, Invert)106- Image filtering event107- Reset filter to original108109### Fine-Tuning110📄 **Read:** [references/finetune.md](references/finetune.md)111- Adjust brightness, contrast, saturation112- Control hue, exposure, blur, opacity113- Finetune value changing events114- Real-time adjustments with sliders115116### Undo and Redo117📄 **Read:** [references/undo-redo.md](references/undo-redo.md)118- Undo/redo operations with 16-step history119- Keyboard shortcuts (Ctrl+Z, Ctrl+Y)120- History management and limits121122### Toolbar Customization123📄 **Read:** [references/toolbar-customization.md](references/toolbar-customization.md)124- Built-in toolbar items (20+ default tools)125- Add, remove, enable, disable toolbar items126- Custom toolbar items with event handlers127- Contextual toolbar for annotations128- Toolbar templates for complete customization129- Toolbar created and item clicked events130131### Quick Access Toolbar132📄 **Read:** [references/quick-access-toolbar.md](references/quick-access-toolbar.md)133- Quick access toolbar for annotations134- Show/hide quick access toolbar135- Add custom items to quick access toolbar136- Quick access toolbar open event137138### Resize Image139📄 **Read:** [references/resize-image.md](references/resize-image.md)140- Resize with or without aspect ratio141- Width and height parameters142- Resizing event with before/after dimensions143144### Frame Decoration145📄 **Read:** [references/frame-decoration.md](references/frame-decoration.md)146- Apply frames (Mat, Bevel, Line, Inset, Hook)147- Customize frame color, size, and line style148- Frame changing event149150### Z-Order Layering151📄 **Read:** [references/z-order-layering.md](references/z-order-layering.md)152- Bring forward/send backward annotations153- Bring to front/send to back154- Manage annotation layer order155156### Redact Sensitive Information157📄 **Read:** [references/redact-sensitive-info.md](references/redact-sensitive-info.md)158- Blur sensitive areas159- Pixelate sensitive information160- Redact CRUD operations (select, update, delete, get)161- Privacy and compliance162163### Accessibility and Localization164📄 **Read:** [references/accessibility-localization.md](references/accessibility-localization.md)165- WCAG 2.2, Section 508 compliance166- Screen reader support167- Keyboard shortcuts (Ctrl+Z, Ctrl+S, Ctrl+O, Delete, Enter, Escape)168- RTL language support169- Localization with 120+ locale keys170171### Image Restrictions and Validation172📄 **Read:** [references/image-restrictions-validation.md](references/image-restrictions-validation.md)173- Allowed file extensions (.jpg, .png, .svg, .webp, .bmp)174- Min and max file size restrictions175- File validation and error alerts176177### Clear Image178📄 **Read:** [references/clear-image.md](references/clear-image.md)179- Clear editor state180- Dialog reuse patterns181- Remove previously loaded images182183### Fit to Width and Height184📄 **Read:** [references/fit-width-height.md](references/fit-width-height.md)185- Fit image to editor container width186- Fit image to editor container height187- Zoom calculations for perfect fit188189### Render in Dialog190📄 **Read:** [references/render-in-dialog.md](references/render-in-dialog.md)191- Render Image Editor within Dialog component192- Content template integration193- Dialog show/hide patterns194195### Reset Image196📄 **Read:** [references/reset-image.md](references/reset-image.md)197- Reset all modifications to original state198- Restore unmodified version199- Clear annotations and effects200201## Quick Start Example202203```vue204<template>205 <div id="container">206 <ImageEditorComponent207 ref="imgObj"208 width="550px"209 height="350px"210 :created="imageEditorCreated"211 />212 </div>213</template>214215<script setup>216import { ref } from 'vue';217import { ImageEditorComponent } from '@syncfusion/ej2-vue-image-editor';218import { Browser } from '@syncfusion/ej2-base';219220const imgObj = ref(null);221222const imageEditorCreated = () => {223 if (Browser.isDevice) {224 imgObj.value?.open('https://ej2.syncfusion.com/vue/documentation/image-editor/images/flower.jpeg');225 } else {226 imgObj.value?.open('https://ej2.syncfusion.com/vue/documentation/image-editor/images/bridge.jpeg');227 }228};229</script>230```231232## Common Patterns233234### Pattern 1: Open + Edit + Save Workflow2351. Open image via `open()` method2362. Apply transformations, annotations, or effects2373. Use `export()` to save as PNG/JPEG/SVG/WEBP2384. Optionally convert to base64 or blob for backend storage239240### Pattern 2: Responsive Toolbar2411. Define custom toolbar items in `toolbar` property2422. Handle clicks via `@toolbarItemClicked` event2433. Execute methods like `rotate()`, `zoom()`, `drawText()` based on clicked item2444. Update contextual toolbar via `@toolbarUpdating` event245246### Pattern 3: Annotation Workflow2471. Enable annotation mode (freehand, text, shape)2482. Customize via `@shapeChanging` event (color, stroke, font)2493. Delete via `deleteShape()` with shape ID2504. Manage layers via z-order methods251252### Pattern 4: Dialog Integration2531. Render Image Editor in Dialog's `content` template2542. Load image when dialog opens via `@fileOpened` event2553. Call `clearImage()` before closing dialog2564. Retrieve edited image data via `export()` or `getImageData()`257258### Pattern 5: Filter + Finetune Pipeline2591. Apply filter via `applyImageFilter()`2602. Fine-tune via `finetuneImage()` (brightness, contrast, etc.)2613. Listen to `@imageFiltering` and `@finetuneValueChanging` events2624. Combine effects for professional results263264## Key Properties265266| Property | Type | Purpose |267|----------|------|---------|268| `width` | string | Editor canvas width (e.g., "550px", "100%") |269| `height` | string | Editor canvas height (e.g., "350px", "100%") |270| `toolbar` | array | Customize toolbar items and visibility |271| `fontFamily` | object | Add custom font families |272| `uploadSettings` | object | Configure file restrictions (extensions, size) |273| `zoomSettings` | object | Set min/max zoom factors |274| `showQuickAccessToolbar` | boolean | Show/hide quick access toolbar |275| `locale` | string | Set localization (e.g., 'de-DE') |276277## Key Events278279| Event | Trigger | Use Case |280|-------|---------|----------|281| `@created` | Component initialized | Load image on startup |282| `@fileOpened` | Image loaded | Add watermarks, apply defaults |283| `@beforeSave` | Before export | Validate, add metadata |284| `@cropping` | During crop | Prevent scaling, lock dimensions |285| `@zooming` | During zoom | Validate zoom level |286| `@rotating` | During rotate | Track rotation angle |287| `@shapeChanging` | Annotation modified | Customize stroke, font |288| `@toolbarUpdating` | Toolbar rendered | Add/remove contextual items |289290## Supported File Formats291292**Open:** PNG, JPEG, JPG, SVG, WEBP, BMP (local, URL, base64, blob)293**Save/Export:** PNG, JPEG, SVG, WEBP294295## Next Steps296297- Start with [getting-started.md](references/getting-started.md) for setup298- Explore [opening-saving-images.md](references/opening-saving-images.md) to understand data flow299- Check specific features in their dedicated reference files300- Use [accessibility-localization.md](references/accessibility-localization.md) for multi-language support