Agent skill · Backend & API

photopea-embedded-editor

Embed Photopea in web apps using photopea.js. Covers embedding, file I/O, scripting, exporting, layers, text, filters, and the full Photoshop-compatible API.

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorMIT
Install
npx skills add sickn33/agentic-awesome-skills --skill photopea-embedded-editor --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 49 KB
Bundled scripts: none
Path: skills/photopea-embedded-editor/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Embeds Photopea in web apps using photopea.js. Provides a Promise-based wrapper around the Photopea Live Messaging API to create an embedded editor, open files (URL or local assets), run Photopea scripts, and export images in PNG/JPG/WebP/PSD/SVG formats. It includes a Plugin mode and utility patterns for common tasks like adding images, editing text, and batch watermarking.

How it works

  • Use Photopea.createEmbed(container) to inject the editor iframe into a fixed-size container; it resolves to a pea object when ready.
  • Open files via pea.openFromURL(url, asSmart) to load as a new document or as a smart object layer; loadAsset(arrayBuffer) to bring in local assets; runScript(script) to execute Photoshop-like scripts inside Photopea and get an array of outputs; exportImage(type) to obtain a Blob in PNG or JPEG formats.
  • Step-by-step usage includes embedding, opening files, running scripts, exporting, loading assets, and optional Plugin mode using new Photopea(window.parent).
  • The API returns Promises for all methods; callers should await or chain with .then().

When to use it

Use this skill for embedding Photopea as an image editor inside a webpage or web app, controlling an embedded Photopea instance from JavaScript, automating image editing workflows (open files, run scripts, export results), and building an image editing feature with Photopea as the engine.

What it can touch

  • Exposed API surface includes the Photopea class and its methods (createEmbed, openFromURL, loadAsset, runScript, exportImage, etc.).
  • The implementation assumes access to a container DOM element and assets via fetch/arrayBuffer, as demonstrated in code samples.

Caveats

  • All examples rely on the photopea.js library and the Photopea scripting interface; behavior is constrained to Photopea capabilities (e.g., app.activeDocument, saveToOE, exportImage).
  • The skill documents plugin usage and various export formats, but notes that integration details (server config for save) may vary by deployment.
From the SKILL.md

# Photopea Embedded Editor Skill ## Using photopea.js (yikuansun/PhotopeaAPI) in Websites & Apps --- ## When to Use This Skill Use this skill for **every task** that involves: - Embedding Photopea as an image editor inside a webpage or web app - Controlling an embedded Photopea instance from your JavaScript code - Automating image editing workflows from a host page (open files, run scripts, export results) - Building an image editing feature into your product using Photopea as the engine - Writing scripts to manipulate documents, layers, text, selections, filters, colors, and paths **Do NOT** use raw `postMessage` wiring — always use `photopea.js` as the wrapper. --- ## Library: photopea.js `photopea.js` is a Promises-based JavaScript wrapper around the Photopea Live Messaging API. Repository: https://github.com/yikuansun/PhotopeaAPI npm package: https://www.npmjs.com/package/photopea ### Installation **CDN (no build step)** ```html <script src="https://cdn.jsdelivr.net/npm/photopea@1.1.1/dist/photopea.min.js"></script> ``` **Self-hosted** ```html <script src="./photopea.min.js"></script> ``` **npm (Webpack / Vite / Rollup)** ```bash npm install photopea ``` ```js import Photopea f

What's inside
Steps it walks through
  1. Using photopea.js (yikuansun/PhotopeaAPI) in Websites & Apps
  2. When to Use This Skill
  3. Library: photopea.js
  4. Installation
  5. Core API: The Photopea Class
  6. Step 1 — Embed
  7. Step 2 — Opening Files
  8. Step 3 — Running Scripts
  9. Step 4 — Exporting
  10. Step 5 — Loading Assets
  11. Step 6 — Plugin Mode
  12. Utility Patterns
  13. addImageAndWait — robust async layer insertion
  14. getDocumentAsImage — returns <img> element
Commands it runs
npm install photopea
More from agentic-awesome-skills
All skills →
About this skill
What does the photopea-embedded-editor skill do?

Embed Photopea in web apps using photopea.js. Covers embedding, file I/O, scripting, exporting, layers, text, filters, and the full Photoshop-compatible API.

How do I install it?

Run `npx skills add sickn33/agentic-awesome-skills --skill photopea-embedded-editor --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going