Angular image editor
An injectable service that opens a full-screen, accessible image editor and resolves with the edited File. Built with Angular Package Format, so it works in AOT and production builds on Angular 15 and newer, including Ionic.
This is the real editor (v1.6.1). Pick a tool and try it.More demos, including multi-image →
Install
npm install @rageshpikalmunde/rp-image-editor @rageshpikalmunde/rp-image-editor-angularUsage
import { Component, inject } from '@angular/core';
import { RpImageEditorService } from '@rageshpikalmunde/rp-image-editor-angular';
@Component({
selector: 'app-photo-upload',
standalone: true,
template: '<input type="file" accept="image/*" (change)="edit($event)" />',
})
export class PhotoUploadComponent {
private editor = inject(RpImageEditorService);
async edit(event: Event) {
const file = (event.target as HTMLInputElement).files?.[0];
if (!file) return;
const result = await this.editor.openEditor(file, { exportFormat: 'jpeg' });
if (result) this.upload(result.file);
}
}
For an inline editor use <rp-image-editor> from RpImageEditorModule. On Angular 17+ with the esbuild builder, add "externalDependencies": ["jsdom", "canvas"] to angular.json.
What you get
- Crop, rotate, flipAspect-ratio presets, rule-of-thirds guide, keyboard nudging.
- AnnotateDraw, text, arrows, shapes and callouts that stay attached through crop and rotate.
- Filters & adjustSeven filters with live previews, plus brightness, contrast, saturation and blur.
- Multi-imageEdit a batch with a thumbnail strip and per-image undo.
- AccessibleWCAG 2.2 AA, full keyboard support, focus management.
- Mobile-readyBottom tool bar, 44 px targets, pinch zoom, HEIC support.
- 15 languagesBuilt-in translations, every string overridable, light and dark themes.
- Full-quality exportPNG or JPEG at the original resolution, as File, Blob or base64.
Questions
Which Angular versions are supported?
Angular 15 and newer, in JIT and AOT builds. Angular SSR is safe: the component only starts in the browser.
Does it work with Ionic and Capacitor?
Yes. The modal is mobile-first (bottom tool bar, 44 px touch targets, pinch to zoom) and iPhone HEIC photos are converted when heic2any is installed.
Can I edit a batch of images?
Yes: openMultiEditor(files) opens them all with a thumbnail strip and returns one result per image.