How it works
sharp wraps libvips, a C image library that processes pictures in small chunks, so it is quick and uses little memory even on large files. It reads JPEG, PNG, WebP, AVIF, GIF, TIFF and SVG, and can resize, crop, rotate according to camera EXIF data, blur, sharpen, composite watermarks, strip metadata and write modern formats, all through a chained API such as sharp(input).resize(800).webp().
It powers image optimisation in many tools, including Next.js when self-hosted, Astro and Gatsby. Prebuilt native binaries cover the common platforms, and it runs under Node, Bun and Deno, but it needs a server runtime: it does not run in the browser, and edge platforms such as Cloudflare Workers usually rely on their own image services instead.
sharp pricing
Related terms
More in Media and documents
Images