Skip to content

zimg

C image server that stores uploads and resizes or converts them through URL parameters

Permissive (OSI) · BSD-3-Clause

Listed by , founder & editor

18

Health

Dormant

Overview

Stars

2,681

Last commit

9 years ago

Oct 2017

Repository age

13 years

since Jul 2013

Latest version

v3.1.0

Sep 2014

Contributors

–

Releases

0

last 12 months

Language

C

zimg is an image storage and processing server written in C. You upload images over HTTP, then request them with URL parameters for width, height, crop position, rotation, grayscale, quality and output format. A separate info URL returns details about a stored image.

It is built on libevhtp, LuaJIT and ImageMagick. You can write Lua scripts to define custom transform rules and request them with a type parameter. For storage it can use local files or distributed backends that speak the memcached protocol (beansdb) or the Redis protocol (SSDB). The author reports more than 3000 image downloads per second in a benchmark.

It is not a photo gallery app. It is infrastructure for sites that need on-the-fly thumbnails and format conversion, and it can stand in for hosted image CDNs and resize services. It is BSD-3-Clause licensed. The last commit was in 2017.

Who it's for

Developers who need on-the-fly thumbnails for a website

Size, crop, rotation and format are set in the URL, so no pre-generation is needed.

Skip if: You want a gallery with albums and user accounts.

Teams running their own image backend

It supports local and distributed storage over memcached or Redis protocols.

Skip if: You need a maintained project with recent security updates.

The problem it solves

Sites that serve user images need many sizes and formats, and generating them ahead of time wastes storage and effort. Hosted resize services add cost and a dependency. zimg does the resizing on request from your own server.

Strengths

  • Resize, crop, rotate, grayscale and format via URL parameters
  • Lua scripting for custom transform rules
  • Optional distributed storage through beansdb or SSDB
  • BSD-3-Clause license; self-hostable

Trade-offs

  • Last commit in 2017, so no recent maintenance
  • You must build dependencies yourself
  • No gallery interface or user management
  • Speed claims come from the author's own benchmark

Self-host zimg

Self-hostable
Yes

Quick start

git clone https://github.com/buaazp/zimg -b master --depth=1
cd zimg   
make  
cd bin  
./zimg conf/zimg.lua

From the project's own install instructions. Check the docs for production settings.

In the community

Frequently asked questions

Is zimg free?

Yes. It is released under the BSD-3-Clause license.

Can I self-host it?

Yes. You build it from source and run it on your own server.

Is it a photo gallery?

No. It is an HTTP image storage and processing server.

What storage does it support?

Local storage, plus beansdb through the memcached protocol and SSDB through the Redis protocol.

Similar tools in Photo storage and galleries

Lychee (electerious/lychee)

Photo storage and galleries

Self-hosted PHP photo gallery for people who want to upload, organize and share albums

6.4k 646 5 years ago Dormant MIT

Google Photos Takeout Helper

Photo storage and galleries

Tool that turns a messy Google Takeout export of Photos into one dated folder

6k 334 2 years ago Dormant Apache-2.0

imgpush

Photo storage and galleries

Minimal self-hosted image upload and resize API for app avatars and user images

358 52 3 months ago Slowing MIT

ipfspics-server

Photo storage and galleries

Self-hosted image gallery built on IPFS, for people who want peer-to-peer picture sharing

1.1k 107 7 years ago Dormant AGPL-3.0

Telegraph-Image

Photo storage and galleries

Image host you deploy on Cloudflare Pages, storing uploads in a Telegram channel

4.7k 8.8k 4 months ago Dormant CC0-1.0