Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

imagescript

Latest version: v4.2.1

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: matmen
691 Stars
35 Forks
42 Versions
925.7K Downloads
TypeScript Repo language

Scan summary

imagescript was last scanned on 30 Nov 2026 at version 4.2.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 42 versions; the latest 4 were published within 6 days (25–30 Nov 2026).
  • Findings: No rules fired in version 4.2.1.
  • Downloads: 925,659 downloads.

Versions

42 versions published
Versions and the rules that fired in each
VersionPublishedStatus
4.2.1 LATEST 30 Nov 2026 No rules fired
4.2.0 30 Nov 2026 No rules fired
4.1.0 29 Nov 2026 No rules fired
4.0.1 25 Nov 2026 Not shown
4.0.0 23 Nov 2026 Not shown

No rules fired in 4.2.1

Findings

Findings for v4.2.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 4.2.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.


ImageScript decodes, edits and encodes images in pure TypeScript: no WebAssembly, no native binaries, no runtime dependencies. It runs on Node.js 22.13+, Deno, Bun, browsers and edge runtimes, and ships with TypeScript type definitions.

npm install imagescript              # Node.js, Bun and bundlers
deno add jsr:@matmen/imagescript     # Deno

Upgrading from 3.x? Read Migrating to 4.0 first.


Example
import { Image } from 'imagescript';
import { readFile, writeFile } from 'node:fs/promises';

const image = await Image.decode(await readFile('input.jpg'));
image.resize({ width: 256 }).roundCorners({ radius: 16 });
await writeFile('output.png', await image.encodePNG());

Example

The same code runs everywhere, only reading and writing the bytes differs. Image.decode() takes any ArrayBuffer or typed array (fetch(url).then(r => r.arrayBuffer()) in a browser or on an edge runtime, Deno.readFile(), Bun.file().arrayBuffer()), and the encoders return a Uint8Array. In a browser without a bundler, import it from jsDelivr:

import { Image } from 'https://cdn.jsdelivr.net/npm/imagescript@4/+esm';
Threads and bundlers

The codecs that can use worker threads (large AVIF and JPEG XL images, lossless WebP; the threads option) do so in Node.js, Deno and Bun, and in browsers on cross-origin isolated pages. Large PNGs are compressed in parallel on the zlib threads of Node.js (4 unless UV_THREADPOOL_SIZE says otherwise) and Bun instead, without a threads option. Where workers can't start, the work runs on the calling thread: the output is the same, only slower, and nothing warns about it. Browsers refuse workers from another origin, so the jsDelivr import above runs single-threaded; serve the package from your own origin (on a cross-origin isolated page) to get threads.

Bundlers that write one file (esbuild, Rollup, bun build) don't copy the worker's module: serve dist/util/worker.js next to the bundle, or the same single-threaded fallback is used. webpack and Vite emit it.


Features
Format Decode Encode
PNG ✓ ✓
JPEG ✓ ✓
WebP ✓ ✓ (lossless and lossy)
AVIF ✓ ✓ (lossless and lossy)
JPEG XL ✓ ✓ (lossless and lossy)
GIF, APNG (animations) ✓ ✓
BMP, QOI, TGA, Netpbm ✓ ✓
TIFF, ICO/CUR, Radiance HDR ✓
HDR gain maps (brighter highlights on HDR displays; JPEG, AVIF, JPEG XL) ✓ ✓

Animations can be decoded from GIF, APNG, WebP and JPEG XL, and encoded as GIF, APNG or WebP, all at once or frame by frame. Lossless encoding keeps every pixel exactly; lossy encoding makes smaller files by approximating some image detail. quality: 100 is lossless for WebP, AVIF and JPEG XL (JPEG has no lossless mode). Without a quality, WebP and JPEG XL are lossless and AVIF is lossy.

Not supported (decoding them throws an error): CCITT-compressed TIFF and arithmetic-coded JPEG. Lossless JPEG XL is fast but not small: for small lossless files, PNG or WebP are the better choice.

Embedded color profiles are converted to sRGB, the standard color format for most screens, where supported. CMYK and lookup-table profiles are left unchanged.

Supported image operations preserve gain maps; editing pixels directly with image.bitmap or setPixelAt() does not.

The documentation covers the full API. When upgrading from an older major version, see the changelog. bench/ compares ImageScript's speed and file sizes with Jimp, sharp and other libraries.


Credits

ImageScript builds on fflate, libjpeg, pdf.js, font-rs, mozjpeg, libwebp, HarfBuzz, dav1d, libavif, libaom, jxl-oxide and libjxl. The TrueType hinting follows FreeType: portions of this software are copyright © 2026 The FreeType Project (www.freetype.org). All rights reserved. See THIRD_PARTY_NOTICES.md for the licenses.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm imagescript

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229