A lightning fast image processing and resizing library for Go
Alternatives To Govips
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Libvips8,369215 hours ago2March 23, 201865lgpl-2.1C
A fast image processing library with low memory needs.
Govips976723 days ago39May 04, 202342mitGo
A lightning fast image processing and resizing library for Go
a day ago77June 22, 20223mitPHP
Dockerized PHP application to resize and crop images on the fly. Get optimised images with MozJPEG, WebP or PNG using ImageMagick, with an efficient caching system.
Image_processing7941,821453 days ago44March 01, 202214mitRuby
High-level image processing wrapper for libvips and ImageMagick/GraphicsMagick
Wasm Imagemagick699258 months ago10August 20, 202073apache-2.0TypeScript
Webassembly compilation of & samples
Magick4391311192 days ago30August 18, 202176otherR
Magic, madness, heaven, sin
110 months ago7September 04, 20184mitTypeScript
Quick and simple image processing at the command line. :hammer:
Jekyll Gallery Generator333
148 months ago19April 03, 20205apache-2.0Ruby
A Jekyll plugin that generates photo galleries from directories full of images.
Skeptick327329 years ago4January 22, 20151mitRuby
Better ImageMagick for Ruby
Node S3 Uploader2327865 years ago45November 24, 201631mitJavaScript
Flexible and efficient resize, rename, and upload images to Amazon S3 disk storage. Uses the official AWS Node SDK for transfer, and ImageMagick for image processing. Support for multiple image versions targets.
Alternatives To Govips
Select To Compare

Alternative Project Comparisons


GoDoc Go Report Card GitHub release (latest SemVer) License Build Status Coverage Status

A lightning fast image processing and resizing library for Go

This package wraps the core functionality of libvips image processing library by exposing all image operations on first-class types in Go.

Libvips is generally 4-8x faster than other graphics processors such as GraphicsMagick and ImageMagick. Check the benchmark: Speed and Memory Use

The intent for this is to enable developers to build extremely fast image processors in Go, which is suited well for concurrent requests.


  • libvips 8.10+
  • C compatible compiler such as gcc 4.6+ or clang 3.0+
  • Go 1.14+



Use homebrew to install vips and pkg-config:

brew install vips pkg-config


You need a recent libvips to work with govips. New govips functionality is continuously added which takes advantage of new libvips functionality. Groovy (20.10) and Hirsute (21.04) repositories have working versions. However on Focal (20.04), you need to install libvips and dependencies from a backports repository:

sudo add-apt-repository -y ppa:strukturag/libde265
sudo add-apt-repository -y ppa:strukturag/libheif
sudo add-apt-repository ppa:tonimelisma/ppa


sudo apt -y install libvips-dev


The recommended approach on Windows is to use Govips via WSL and Ubuntu.

If you need to run Govips natively on Windows, it's not difficult but will require some effort. We don't have a recommended environment or setup at the moment. Windows is also not in our list of CI/CD targets so Govips is not regularly tested for compatibility. If you would be willing to setup and maintain a robust CI/CD Windows environment, please open a PR, we would be pleased to accept your contribution and support Windows as a platform.


go get -u

MacOS note

On MacOS, govips may not compile without first setting an environment variable:

export CGO_CFLAGS_ALLOW="-Xpreprocessor"

Example usage

package main

import (


func checkError(err error) {
	if err != nil {
		fmt.Println("error:", err)

func main() {
	defer vips.Shutdown()

	image1, err := vips.NewImageFromFile("input.jpg")

	// Rotate the picture upright and reset EXIF orientation tag
	err = image1.AutoRotate()

	ep := vips.NewDefaultJPEGExportParams()
	image1bytes, _, err := image1.Export(ep)
	err = ioutil.WriteFile("output.jpg", image1bytes, 0644)


See examples/ folder for more examples.

Running tests

$ make test

Memory usage note


libvips uses GLib for memory management, and it brings GLib memory fragmentation issues to heavily multi-threaded programs. First thing you can try if you noticed constantly growing RSS usage without Go's sys memory growth is set MALLOC_ARENA_MAX:

MALLOC_ARENA_MAX=2 application

This will reduce GLib memory appetites by reducing the number of malloc arenas that it can create. By default GLib creates one are per thread, and this would follow to a memory fragmentation.


Feel free to file issues or create pull requests. See this guide on contributing for more information.


Thanks to:



Popular Image Processing Projects
Popular Imagemagick Projects
Popular Media Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Image Processing