MCPInstall

syncfusion-aspnetcore-image-editor

Implement the Syncfusion ASP.NET Core Image Editor (EJ2) component. Use this when adding image editing to an ASP.NET Core application, including cropping, rotating, annotations, fine-tuning (brightness, contrast, blur), and filter application. Covers opening/saving images, toolbar customization, redaction, resizing, and image editor event handling with ejs-imageeditor.

Installs
105
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/syncfusion/aspnetcore-ui-components-skills --skill syncfusion-aspnetcore-image-editor
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads syncfusion-aspnetcore-image-editor automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Implementing Syncfusion ASP.NET Core Image Editor

The Syncfusion EJ2 Image Editor provides a rich, interactive image editing experience directly in the browser. It supports opening, editing, and saving images in PNG, JPEG, SVG, WEBP, and BMP formats. All actions—including annotations, transformations, and filters—are tracked in a 16-step undo/redo history.

Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • NuGet installation and setup
  • Tag helper registration in _ViewImports.cshtml
  • Adding stylesheet and script references — local assets (recommended) or CDN with SRI hashes
  • Rendering the basic <ejs-imageeditor> tag
  • Container CSS for proper sizing

Opening & Saving Images

📄 Read: references/open-save.md

  • open() method — local file, base64, Blob, URL, File Uploader, File Manager
  • Opening with custom width/height via imageSettings
  • export() — save with format and quality options
  • getImageData() — retrieve image as base64 / Blob
  • clearImage() and reset() patterns
  • Rendering Image Editor inside a Dialog
  • Adding watermarks automatically on open
  • FileOpened, Saving, and BeforeSave events

Transformations (Rotate, Flip, Zoom, Pan)

📄 Read: references/transform.md

  • rotate() — clockwise/anti-clockwise in degrees
  • flip() — Horizontal or Vertical
  • straightenImage() — ±45° range for alignment
  • zoom() — magnify with optional zoom point
  • ZoomSettings — minZoomFactor, maxZoomFactor
  • Panning behavior when image exceeds canvas
  • Rotating, Flipping, Zooming, Panning events

Selection & Cropping

📄 Read: references/selection-cropping.md

  • select() — custom, square, circle, aspect ratio types
  • crop() — execute crop on selected region
  • Maintaining original image size during cropping (preventScaling)
  • SelectionChanging event — programmatic selection adjustments
  • Locking selection area to prevent resizing
  • Custom ratio cropping via public methods

Annotations

📄 Read: references/annotation.md

  • drawText() — text with font, size, bold, italic, underline, strikethrough, fill, stroke
  • Multiline text using \n in text content
  • drawRectangle(), drawEllipse(), drawLine(), drawArrow(), drawPath()
  • drawImage() — overlay images, logos, watermarks
  • freehandDraw() — enable/disable freehand drawing mode
  • deleteShape() / getShapeSetting() — manage annotations
  • FontFamily property — add custom font families
  • Z-order management (bring forward, send backward, bring to front, send to back)
  • ShapeChanging / ShapeChange events

Fine-Tune & Filters

📄 Read: references/finetune-filter.md

  • finetuneImage() — brightness, contrast, saturation, hue, exposure, blur, opacity
  • FinetuneSettings property for configuring available fine-tune options
  • applyImageFilter() — cold, warm, chrome, sepia, grayscale, invert
  • FinetuneValueChanging event
  • ImageFiltering event with cancel support

Resize & Redact

📄 Read: references/resize-redact.md

  • resize() — width, height, aspect ratio control
  • Resizing event with before/after dimensions
  • drawRedact() — blur or pixelate sensitive areas
  • selectRedact(), deleteRedact(), updateRedact(), getRedacts()

Toolbar & Quick Access Toolbar

📄 Read: references/toolbar-quickaccess.md

  • Built-in toolbar items list (Open, Undo, Redo, Crop, Annotate, Filter, Save, etc.)
  • Toolbar property — add, remove, or hide toolbar items
  • ToolbarTemplate — replace entire toolbar with custom HTML
  • ToolbarUpdating event — customize contextual toolbars
  • ShowQuickAccessToolbar — toggle quick access toolbar
  • QuickAccessToolbarOpen event — add custom items to quick access toolbar
  • ToolbarCreated / ToolbarItemClicked events

Frames, Localization, Accessibility & Undo-Redo

📄 Read: references/frames-localization-accessibility.md

  • drawFrame() — mat, bevel, line, hook, inset frame types
  • UploadSettings — restrict file extensions and file sizes
  • Locale property — internationalization with translation objects
  • WCAG 2.2 AA compliance, keyboard shortcuts
  • undo() / redo() methods and AllowUndoRedo property (16-step history)

API Reference

📄 Read: references/api.md

  • All properties: AllowUndoRedo, CssClass, Disabled, Height, Width, Theme, Locale
  • Complex settings objects: ZoomSettings, FinetuneSettings, SelectionSettings, UploadSettings, FontFamily
  • All events with their argument types
  • Client-side JavaScript methods

Quick Start

1. Install NuGet Package

Install-Package Syncfusion.EJ2.AspNet.Core

2. Register Tag Helper (~/Pages/_ViewImports.cshtml)

@addTagHelper *, Syncfusion.EJ2

3. Add CSS & Script (~/Pages/Shared/_Layout.cshtml)

Local Assets Only (Required for Security Compliance)

Download the Syncfusion EJ2 distribution from the official release and host locally:

<head>
     <!-- CSS hosted locally in wwwroot/lib/ej2/ -->
     <link rel="stylesheet" href="/lib/ej2/fluent2.css" />
</head>
<body>
    ...
    <!-- JavaScript hosted locally in wwwroot/lib/ej2/ -->
    <!-- IMPORTANT: Do NOT load from external CDN — use local assets only -->
    <script src="/lib/ej2/ej2.min.js"></script>
    <ejs-scripts></ejs-scripts>
</body>

⚠️ Security Policy: External CDN loading is not permitted. All Syncfusion runtime assets must be hosted locally in your application.

4. Render Image Editor (~/Pages/Index.cshtml)

<div class="e-img-editor-sample">
    <ejs-imageeditor id="image-editor"></ejs-imageeditor>
</div>

<style>
    .e-img-editor-sample {
        height: 80vh;
        width: 100%;
    }
</style>

Common Patterns

Open an Image Programmatically

Option A: Local Image File (Recommended)

<ejs-imageeditor id="image-editor" created="onCreated"></ejs-imageeditor>

<script>
function onCreated() {
    var imageEditor = document.getElementById('image-editor').ej2_instances[0];
    // Reference local image in wwwroot/images/
    imageEditor.open('/images/nature.png');
}
</script>

Option B: User-Uploaded Image (Base64)

<ejs-uploader id="fileUpload" selected="onFileSelected"></ejs-uploader>
<ejs-imageeditor id="image-editor"></ejs-imageeditor>

<script>
function onFileSelected(args) {
    if (args.filesData.length > 0) {
        var reader = new FileReader();
        reader.onload = function() {
            // Pass base64-encoded local data (no external fetch)
            var imageEditor = document.getElementById('image-editor').ej2_instances[0];
            imageEditor.open(reader.result);
        };
        reader.readAsDataURL(args.filesData[0].rawFile);
    }
}
</script>

Export / Save Image

<button onclick="saveImage()">Save</button>
<ejs-imageeditor id="image-editor" created="onCreated"></ejs-imageeditor>

<script>
function onCreated() {
    var imageEditor = document.getElementById('image-editor').ej2_instances[0];
    // Load local image
    imageEditor.open('/images/nature.png');
}

function saveImage() {
    var imageEditor = document.getElementById('image-editor').ej2_instances[0];
    imageEditor.export('PNG');  // saves as PNG to local device
}
</script>

Handle FileOpened Event

<ejs-imageeditor id="image-editor" fileOpened="onFileOpened"></ejs-imageeditor>

<script>
function onFileOpened(args) {
    console.log('Opened file:', args.fileName, 'Type:', args.fileType);
}
</script>

Restrict Upload File Types

<ejs-imageeditor id="image-editor">
    <e-imageeditor-uploadsettings allowedExtensions=".jpg, .png, .webp"
                                  minFileSize="10000"
                                  maxFileSize="5000000">
    </e-imageeditor-uploadsettings>
</ejs-imageeditor>

Key Properties at a Glance

PropertyTypeDefaultPurpose
heightstring"100%"Editor height
widthstring"100%"Editor width
allowUndoRedobooltrueEnable undo/redo (16 steps)
disabledboolfalseDisable the control
showQuickAccessToolbarbooltrueShow annotation quick access toolbar
themeThemeBootstrap5Shape selection appearance theme
localestring"en-US"Localization culture
imageSmoothingEnabledboolfalseHigh-quality rendering smoothing
toolbarobjectdefault itemsToolbar items array
toolbarTemplatestringnullCustom toolbar template selector

Security & Trust Boundary

⚠️ CRITICAL: Never Load External URLs

DO NOT use imageEditor.open() or drawImage() with external/untrusted URLs:

// ❌ FORBIDDEN — Loads remote content from untrusted sources
imageEditor.open('https://untrusted-external-cdn.com/bridge.png');
imageEditor.open('https://example.com/user-uploads/image.jpg');  // Arbitrary external URL
imageEditor.drawImage('https://external-site.com/logo.png', 10, 10, 100, 50);

// ✅ SAFE — Use only local/trusted sources
imageEditor.open('/images/local-image.png');  // Local file in wwwroot
imageEditor.open(base64DataUrl);              // Base64 encoded (local data)
imageEditor.open(blobUrl);                    // Blob URL from File input
imageEditor.drawImage('/images/company-logo.png', 10, 10, 100, 50);  // Local asset

External URLs create supply-chain and injection risks that cannot be fully mitigated.


Runtime & Content Security

CRITICAL POLICY: This skill requires all runtime code and content to be sourced locally.

Requirement 1: Local Runtime Assets Only (W012)

The Syncfusion EJ2 runtime library MUST be hosted locally:

  • ✅ Download from official Syncfusion release
  • ✅ Host in wwwroot/lib/ej2/
  • ✅ Reference as /lib/ej2/ej2.min.js (local path only)
  • ❌ DO NOT load from any external CDN or remote URL

**Requirement 2: Local Content Only (W011)

Content Security Practices

1. Load Images as Base64 or Blob (Recommended)

Load user-uploaded files locally and pass as base64 or Blob to avoid any external fetches:

// ✅ SAFE: Load user file locally as base64
function selected(args) {
    if (args.filesData.length > 0) {
        var reader = new FileReader();
        reader.onload = function() {
            imageEditor.open(reader.result);  // Base64 data, not URL
        };
        reader.readAsDataURL(args.filesData[0].rawFile);
    }
}
2. Server-Side Image Validation

Validate all image uploads server-side before processing:

// ASP.NET Core controller
[HttpPost]
public IActionResult ValidateImage(IFormFile file)
{
    // Whitelist allowed MIME types only
    var allowedTypes = new[] { "image/png", "image/jpeg", "image/webp", "image/bmp" };
    if (!allowedTypes.Contains(file.ContentType))
        return BadRequest("Invalid image format");
    
    // Enforce file size limits (e.g., max 5MB)
    if (file.Length > 5 * 1024 * 1024)
        return BadRequest("File too large");
    
    return Ok();
}
3. Local Assets Only for Overlays

When using drawImage() for logos or watermarks, reference only local assets:

// ✅ SAFE: Local asset in wwwroot/images/
imageEditor.drawImage('/images/company-logo.png', 10, 10, 100, 50);

// ❌ FORBIDDEN: External URLs not permitted
// imageEditor.drawImage('https://external-site.com/logo.png', ...);  
4. Implement Content Security Policy

Restrict all content sources to local/trusted origins:

<!-- Enforce local-only content loading -->
<meta http-equiv="Content-Security-Policy" 
      content="script-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline';">

Trust Assessment

FactorAssessment
VendorSyncfusion Inc. — established enterprise component vendor, widely adopted
ProtocolAll CDN resources served over HTTPS with certificate pinning possible
TransparencyRegular security updates and CVE disclosures via Syncfusion support channels
MonitoringCheck Syncfusion security bulletins and NuGet package advisory database
Undo/Redo16-step history is local-only; no cloud sync or external telemetry

Best Practices

✅ Runtime Asset Security

  • Host all Syncfusion runtime assets locally in wwwroot/lib/ej2/
  • Never load from external CDN or remote servers
  • Update to latest stable version regularly
  • Monitor Syncfusion security advisories
  • Verify package integrity using NuGet package signatures

✅ Content & Image Security

  • Load all images as base64 or Blob (local data only)
  • Validate file type, size, and content server-side
  • Never trust user-supplied URLs directly
  • Reference only internal assets for overlays (logos, watermarks)
  • Use wwwroot/images/ for all application images

✅ Compliance & Monitoring

  • Implement strict CSP: script-src 'self'; img-src 'self' data:
  • Perform security scans during CI/CD pipeline
  • Audit dependencies with snyk, dotnet list package --vulnerable, etc.
  • Maintain inventory of all local hosted assets
  • Test security updates in staging before production deployment

Related Skills

  • Implementing Syncfusion ASP.NET Core Components — Parent library skill

FAQ

What does the syncfusion-aspnetcore-image-editor skill do?

Implement the Syncfusion ASP.NET Core Image Editor (EJ2) component. Use this when adding image editing to an ASP.NET Core application, including cropping, rotating, annotations, fine-tuning (brightness, contrast, blur), and filter application. Covers opening/saving images, toolbar customization, redaction, resizing, and image editor event handling with ejs-imageeditor.

How do I install syncfusion-aspnetcore-image-editor?

Run npx skills add https://github.com/syncfusion/aspnetcore-ui-components-skills --skill syncfusion-aspnetcore-image-editor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-aspnetcore-image-editor/ (personal) or .claude/skills/syncfusion-aspnetcore-image-editor/ (project).

Which AI agents can use syncfusion-aspnetcore-image-editor?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is syncfusion-aspnetcore-image-editor safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains syncfusion-aspnetcore-image-editor?

It is published by syncfusion in syncfusion/aspnetcore-ui-components-skills. It has 105 recorded installs.

More from syncfusion/aspnetcore-ui-components-skills

View all →

syncfusion-aspnetcore-charts

syncfusion/aspnetcore-ui-components-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design112 installs

syncfusion-aspnetcore-common

syncfusion/aspnetcore-ui-components-skills

CONFIGURATION GUIDE — Assist with Syncfusion ASP.NET Core EJ2 components setup, localization, and version compatibility. Use when: installing Syncfusion packages, configuring globalization/localization, selecting compatible versions.

Frontend & Design111 installs

syncfusion-aspnetcore-license

syncfusion/aspnetcore-ui-components-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design111 installs

syncfusion-aspnetcore-grid

syncfusion/aspnetcore-ui-components-skills

Implements Syncfusion ASP.NET Core Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.

Frontend & Design110 installs

syncfusion-aspnetcore-security

syncfusion/aspnetcore-ui-components-skills

Open the skill to read its SKILL.md instructions.

Security108 installs

syncfusion-aspnetcore-gantt-chart

syncfusion/aspnetcore-ui-components-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design108 installs

Popular media & creative skills

View category →

hyperframes

heygen-com/hyperframes

Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.

Media & Creative1.2M installs

media-use

heygen-com/hyperframes

Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.

Media & Creative1.1M installs

hyperframes-registry

heygen-com/hyperframes

About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.

Media & Creative1M installs

hyperframes-creative

heygen-com/hyperframes

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.

Media & Creative916.5K installs

ai-video-generation

101-skills/superpowers

Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse

Media & Creative881.5K installs

ai-image-generation

101-skills/superpowers

Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image

Media & Creative880.3K installs