Resize and convert uploaded image files in a Node.js web server before saving them to storage
Strip EXIF metadata from photos and batch-convert them to a different format in a backend script
Rotate images and add text overlays in a Node.js processing pipeline without shelling out manually
Requires GraphicsMagick or ImageMagick binaries installed on the host system before the npm package will work.
This repository is the source code for a Node.js library called gm, which let developers work with images in JavaScript by calling GraphicsMagick or ImageMagick under the hood. GraphicsMagick and ImageMagick are established command-line programs for processing images: resizing them, converting between formats, adding text, applying filters, and many other operations. The gm library wrapped those programs so that JavaScript developers could trigger the same operations from code without writing shell commands by hand. Using the library, a developer could write a short script to resize a photo, strip its metadata, rotate it, draw shapes on it, or convert it from one format to another. The library supported reading images from files, from incoming network streams, or from raw data buffers, and it could write the output back to files or send it as a stream to another part of the application. As of February 2025, the original author officially marked the project as unmaintained. The README states that no further issues will be addressed, no pull requests will be merged, and no new releases will be published. The author started the project in 2010 as part of a startup, sold the company that same year, and had not used the library in over a decade before sunsetting it. Existing published versions remain available to install via npm, but the README advises moving away from this library because unpatched security vulnerabilities will accumulate over time with no one to fix them. The suggested replacement is to call the GraphicsMagick or ImageMagick binaries directly using a utility like cross-spawn, which is essentially what this library was doing internally.
← aheckmann on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.