Skip to main content
Fast and simple HEIC/HEIF to JPEG converter for Node.js. Native performance, zero runtime dependencies. Built with node-api.

Install

Prebuilt binaries are provided for: Works with Node.js, Bun, and Deno.

Usage

API

heifToJpeg(input, options?)

Convert a HEIF/HEIC buffer to JPEG.
  • input Buffer: HEIF/HEIC file contents
  • options.quality number: JPEG quality, 1-100 (default: 85)
  • Returns Promise<Buffer>: JPEG file contents

How it works

All processing runs on the libuv thread pool - the main thread is never blocked.
  1. libheif parses the HEIF container
  2. libde265 decodes the HEVC payload to raw RGB pixels
  3. jpeg-encoder (pure Rust) encodes to JPEG

Building from source

Requires Rust, CMake, and a C/C++ compiler.

License

MIT