npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ep_images_extended_v2

v2.0.6

Published

Insert images inline with text, float them, resize them — with fixed HTML/DOCX export. Fork of ep_images_extended with export bug fixes.

Readme

ep_images_extended_v2

Insert images inline with text, float them, resize them — with working HTML and DOCX export.

This is a fork of ep_images_extended by DCastelone, with critical bug fixes for the HTML and DOCX export pipeline.

Demo


What's fixed in v2

The original plugin stored images correctly in the pad but they were invisible in HTML and DOCX exports. Six bugs were identified and fixed:

Bug 1 — Export hooks were never registered exportHTML.js existed but getLineHTMLForExport and stylesForExport were missing from ep.json, so the export code never ran.

Bug 2 — Text lines were broken The export handler modified lineContent for every line, even lines with no images. This caused text lines to lose formatting and show * placeholders.

Bug 3 — Only one image per line A break statement stopped processing after the first image on a line. Multiple side-by-side images were lost.

Bug 4 — Text alignment was lost When ep_align was installed alongside this plugin, image lines lost their alignment because the alignment wrapper from ep_align was overwritten.

Bug 5 — DOCX export crashed Security.escapeHTML() escaped / as /, turning data:image/png;base64,... into data:image/png;base64,.... The html-to-docx library could not parse the MIME type and crashed with a null reference error.

Bug 6 — Local storage images missing from exports Images stored on disk (local storage mode) were exported as relative server paths (/static/images/...). These paths do not resolve when the HTML file is opened locally or when DOCX is generated. Fixed by fetching images from the internal server and embedding them as base64 at export time.

Result

| Feature | v1.1.2 | v2.0.0 | |---------|--------|--------| | Images visible in HTML export | ✗ | ✓ | | Images visible in DOCX export | ✗ | ✓ | | Local storage images in exports | ✗ | ✓ (embedded as base64) | | Multiple images per line | ✗ | ✓ | | Text alignment preserved | ✗ | ✓ | | Text lines unaffected | ✗ | ✓ |


Known limitation — PDF export

PDF export in Etherpad uses pdfkit with a built-in HTML parser that does not support images, colors, or advanced formatting from plugins. This is a core Etherpad limitation with no plugin hooks available. Images will not appear in the default PDF export.


Requirements

Etherpad only (ep_etherpad-lite) — no other plugin is required; this plugin adds image support itself. For images in PDF export specifically, also use a real PDF exporter such as ep_pdf_export_print or ep_pdf_export_chromium, since core PDF export ignores images (see the note above).


Installation

Via the Etherpad admin panel — search for ep_images_extended_v2.

Or from the command line in your Etherpad directory:

pnpm run plugins i ep_images_extended_v2

Configuration (settings.json)

Add an ep_images_extended block to your settings.json:

| key | type | default | description | |-----|------|---------|-------------| | fileTypes | Array<string> | none | Allowed extensions (no dot). If omitted, any image/ MIME is accepted. | | maxFileSize | Number (bytes) | unlimited | Reject files larger than this. | | storage | Object | { "type": "base64" } | Storage backend. See below. |

Storage strategies

1. Embedded Base-64 (default — zero config)

"ep_images_extended": {
  "storage": { "type": "base64" },
  "fileTypes": ["jpeg", "jpg", "png", "gif", "bmp", "webp"],
  "maxFileSize": 5000000
}

2. Amazon S3 with presigned uploads

"ep_images_extended": {
  "storage": {
    "type": "s3_presigned",
    "region": "us-east-1",
    "bucket": "my-etherpad-images",
    "publicURL": "https://cdn.example.com/",
    "expires": 900
  },
  "fileTypes": ["png", "jpg", "webp"],
  "maxFileSize": 10485760
}

AWS credentials are read from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).

3. Local disk

"ep_images_extended": {
  "storage": {
    "type": "local",
    "baseFolder": "static/images",
    "baseURL": "https://pad.example.com/etherpad-lite/static/images/"
  },
  "fileTypes": ["jpeg", "jpg", "png", "gif"],
  "maxFileSize": 5000000
}

Contributing

Bug reports and PRs are welcome.


Credits

See NOTICE.md for full attribution.