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

sk-image

v1.5.0

Published

Signal K image library plugin: secure upload, on-demand resize/re-encode, disk cache, and a web-app image manager.

Readme

SK Image

Your boat's image library, served by Signal K.

CI License: MIT code style: prettier

SK Image is a Signal K server plugin that stores and serves images for your vessel — logos, cabin diagrams, deck plans, safety cards, reference photos. It validates uploads, re-encodes and resizes them to WebP on demand, keeps a size-capped disk cache, and exposes a small REST API. It ships its own web-app image library — browse, upload, view EXIF, and organize into collections — served at /sk-image, and is also built to back the KIP Image widget.

Documentation: start with Getting started, or browse the full docs — boater guides, the HTTP API reference, and developer docs with architecture and sequence diagrams.

Why you need it

  • One shared library. Upload once; every dashboard and device on the boat can display it.
  • Fast, right-sized images. Originals are re-encoded to WebP and resized to the width each screen actually needs, then cached on disk so repeat views are instant.
  • Safe by default. Uploads are validated by content (not filename), raster images are always re-encoded, and SVGs are sanitized — so a malicious upload can't run scripts or phone home.

What you'll need

  • A Signal K server, version 2 or newer, running on Node.js 22.13 or newer — required by the plugin's built-in SQLite (node:sqlite). Devices still on Node.js 20 (including the Victron Cerbo GX / Venus OS) can't run it yet.
  • Enough disk for your originals plus the resize cache (the cache size is configurable; default 1 GiB).

Install

Install SK Image from the Signal K Appstore, then enable it and restart the server.

Or install manually:

npm install sk-image

How to use it

Once enabled, the plugin serves its API under /signalk/v1/api/sk-image (reachable by ordinary crew on a secured server; a /plugins/sk-image alias also exists but is admin-only under security):

| Method | Path | Purpose | | --- | --- | --- | | GET | /signalk/v1/api/sk-image/config | Capabilities (supported widths, size limits) | | POST | /signalk/v1/api/sk-image/images | Upload an image (write access required) | | GET | /signalk/v1/api/sk-image/images | List the library | | GET | /signalk/v1/api/sk-image/images/:id?w=<width> | Serve a resized WebP variant (or sanitized SVG) | | DELETE | /signalk/v1/api/sk-image/images/:id | Delete an image (write access required) | | GET | /signalk/v1/api/sk-image/images/cache | Cache size + file count | | DELETE | /signalk/v1/api/sk-image/images/cache | Purge generated variants (write access required) |

Image metadata is also published as the v2 images resource type at /signalk/v2/api/resources/images (read-only, no GPS). See docs/reference/http-api.md for details.

Good to know

  • Requested widths snap to a fixed allow-list, so the cache stays bounded and browser caching lines up across devices. Clients discover the list from GET /config rather than hard-coding it.
  • Purging the cache only removes generated variants — your originals are untouched and variants regenerate on demand.

Configuration

The only setting is the resize-cache budget, edited on the plugin's config screen:

  • Max resized-image cache size — disk budget for generated variants (default 1 GiB). Originals are not counted against it.

See docs/reference/configuration.md.

Troubleshooting

  • Uploads return 401 — the server has security enabled and you're not logged in. Log in, or grant the account write access.
  • The Appstore can't install it — the server needs internet access to reach the npm registry.

For developers

npm install        # install deps + git hooks
npm run build      # compile the plugin to dist/
npm test           # run the unit tests (vitest)
npm run lint       # eslint
npm run format     # prettier --write

Source lives in src/ and compiles to dist/ (the published entry is dist/index.js). Image bytes are stored on disk under the plugin's data dir; metadata lives in an SQLite database beside them. See AGENTS.md for a source-tree map and the security invariants.

The developer docs go deeper, with diagrams:

Run your changes against a Signal K server

Build, then symlink the working copy into the server's modules so it loads your local build:

npm run build
ln -s "$(pwd)" ~/.signalk/node_modules/sk-image
# restart the Signal K server, then enable "SK Image" in the plugin config

Contributing

Contributions are welcome — see CONTRIBUTING.md. Commit messages follow Conventional Commits.

License

MIT © Dillan Laughlin