flyimg is a free, open source photo & video editors project written in PHP and released under AGPL-3.0. It has 1,229 GitHub stars, 123 forks and 0 open issues, and was last pushed 18 days ago. On this registry it ranks #63 of 79 tracked projects in Photo & Video Editors, with 5 head-to-head comparisons available.

What is flyimg?

Flyimg is a Dockerized, self-hostable image processing service that resizes, crops and compresses images on the fly, serving them in optimized formats such as AVIF, WebP, MozJPEG, PNG and GIF, and it is aimed at developers and teams who want a Cloudinary-style image delivery pipeline running on their own infrastructure.

What it is

Flyimg is an open-source application written in PHP and licensed under AGPL-3.0. It runs as a single Docker container built around ImageMagick, with nginx and php-fpm started inside the container by s6-overlay and listening on port 80. The project is distributed as the Docker image flyimg/flyimg, and its own README describes it as "one Docker container to build your own Cloudinary-like service." Alongside the self-hosted option, the project also offers a fully managed Flyimg SaaS, so the same feature set is available either as software you operate or as a hosted service.

The concrete problem it solves is image transformation and delivery without a hand-rolled pipeline or a third-party dependency. Rather than pre-generating every size and format a site might need, or wiring up a separate resize worker and cache, a developer appends transformation options to a URL path, and Flyimg fetches the source image, converts it, stores the result, caches it and serves it. Subsequent requests for the same transformation are answered from cache. This replaces the stack of resize scripts, conversion jobs and cache layers that would otherwise have to be assembled and maintained around ImageMagick, and it exposes that work as a predictable HTTP interface.

Key capabilities

  • URL-driven transformations using the /upload/ path prefix followed by option and value pairs, for example /upload/w_130,h_113,q_90/ before the source image URL, with options separated by commas such as w_250,q_50.
  • Automatic format negotiation through o_auto, which selects a format based on the request's Accept header, generating AVIF by default when the browser supports it.
  • Additional output formats including WebP, MozJPEG, PNG and GIF, giving coverage for both modern and legacy clients.
  • JPEG XL (JXL) output via ImageMagick when enabled, which can be forced with o_jxl and tuned with encoder effort values from jxlef_1 to jxlef_9.
  • An efficient caching system that stores converted images and serves the cached version on repeat requests.
  • Configuration through config/parameters.yml, which can be mounted as a volume to override the defaults without rebuilding the image.
  • Face detection is listed among the project's topics, alongside image processing, resizing and cropping capabilities.

Who uses it and how

  • Teams that need a self-hosted image optimization endpoint and prefer to keep transformed assets on their own infrastructure rather than in a third-party service.
  • Developers evaluating or prototyping transformations against the public demo at https://demo.flyimg.io/, which exposes the resize, crop and compression features without any setup.
  • Local development and custom builds, where the repository is cloned, the image is built with docker build -t flyimg ., and composer install is run inside the container on first use.
  • Operators on Mac, Windows or Ubuntu, which the README lists as the tested environments, with Docker Machine optionally used to create a virtual environment.
  • Organizations that would rather not run containers at all and instead consume the managed Flyimg service described in the README as production-ready and fully managed.

Getting started

The quickest route is to pull and run the published image with docker pull flyimg/flyimg followed by docker run -itd -p 8080:80 flyimg/flyimg, after which http://127.0.0.1:8080/ should return a "Hello from Flyimg!" message. Custom settings are applied by copying config/parameters.yml locally and mounting it into the container at /var/www/html/config/parameters.yml.

How it compares

The README frames Flyimg explicitly as a way to build your own Cloudinary-like service, which places it in the same functional territory as Cloudinary while remaining software you run yourself. The differences the project supports are ones of control: Flyimg is AGPL-3.0 licensed and self-hosted by default, so the transformed images and cache live on the operator's own machine, whereas a managed product handles that infrastructure on the vendor's side. For teams that want the hosted model, the project's own managed SaaS is offered as an alternative to self-hosting the same application.

When to use it — and when not to

A self-hoster must be prepared to operate a Docker container running nginx, php-fpm and ImageMagick, to manage the parameters file, and to provide storage for the cache that the service writes to. Teams that cannot accept the obligations of an AGPL-3.0 licence, or that have no interest in running and upgrading containers, should consider the managed Flyimg service or a different approach entirely. It is also worth noting that the README excerpt covers installation, transformation syntax and configuration but does not detail cache storage backends or multi-node deployment, so anyone planning a large distributed setup should consult the full documentation at https://docs.flyimg.io before committing.

project readme (upstream, from github) — read inline

Flyimg

Flyimg logo
Open‑source, self‑hosted Flyimg for on-the-fly image optimization.
Flyimg Managed Service
Production‑ready, fully managed Flyimg SaaS for image optimization.

Start in minutes

Backers on Open Collective Sponsors on Open Collective Build Status Codecov License Latest Stable Version]
flyimg%2Fflyimg | Trendshift

The Flyimg project is a Dockerized application that allows you to resize, crop, and compress images on the fly. One Docker container to build your own Cloudinary-like service.

By default, Flyimg generates the AVIF image format (when the browser supports it) which provides superior compression compared to other formats.

Additionally, Flyimg also generates the WebP format, along with the impressive MozJPEG compression algorithm to optimize images, other formats are supported also such as PNG and GIF. Flyimg also supports JPEG XL (JXL) output via ImageMagick when enabled. Use o_auto to negotiate formats based on the request Accept header. You can force JXL with o_jxl and tune encoder effort with jxlef_1..9.

Fetch an image from anywhere; resize, compress, cache and serve... and serve, and serve, and serve...

You pass the image URL and a set of keys with options, like size or compression. Flyimg will fetch the image, convert it, store it, cache it and serve it. The next time the request comes, it will serve the cached version.

<!-- https://flyimg.io/demo-images/Citroen-DS.jpg -->
<img
  src="https://demo.flyimg.io/upload/w_300,q_90/https://flyimg.io/demo-images/Citroen-DS.jpg"
/>

Flyimg-demo

Demo

Check out our demo page where you can test and review Flying's features:

https://demo.flyimg.io/

Documentation

Documentation available here: https://docs.flyimg.io

Requirements

You will need to have Docker on your machine. Optionally you can use Docker machine to create a virtual environment. We have tested on Mac, Windows and Ubuntu.

Usage

Pull the docker image

docker pull flyimg/flyimg

Start the container

docker run -itd -p 8080:80 flyimg/flyimg

To use custom parameters, make a copy of parameters.yml to your current directory. Update to suit your needs and run the command with volume parameter to replace the original parameters file.

docker run -itd -p 8080:80 -v $(pwd)/parameters.yml:/var/www/html/config/parameters.yml flyimg/flyimg

Build locally [Development Mode]

git clone https://github.com/flyimg/flyimg.git

CD into the folder and to build the docker image by running:

docker build -t flyimg .

This will download and build the main image, It will take a few minutes. If you get some sort of error related to files not found by apt-get or similar, try this same command again.

IMPORTANT! If you cloned the project, only for the first time, you need to run composer install inside the container:

docker exec -it flyimg composer install

Again, it will take a few minutes to download the dependencies. Same as before, if you get some errors you should try running composer install again.

Then run the container:

docker run -itd -p 8080:80 -v $(pwd):/var/www/html --name flyimg flyimg

For Fish shell users:

docker run -itd -p 8080:80 -v $PWD:/var/www/html --name flyimg flyimg

The above command will make the Dockerfile run s6-overlay command which launches 2 services: nginx and php-fpm and starts listening on port 80 on the container and port 8080 on the host.

Testing Flyimg service

You can navigate to your machine's IP in port 8080 (ex: http://127.0.0.1:8080/ ) ; you should get a message saying: Hello from Flyimg! and a small homepage of Flyimg already working. If you get any errors at this stage it's most likely that composer has not finished installing or skipped something.

You can test your image resizing service by navigating to: http://127.0.0.1:8080/upload/w_130,h_113,q_90/https://flyimg.io/demo-images/Citroen-DS.jpg

It's working!

This is fetching an image from Mozilla, resizing it, saving it and serving it.

How to transform images

You go to your server URLhttp://imgs.kitty.com and append /upload/; after that you can pass these options below, followed by an underscore and a value w_250,q_50 Options are separated by coma (configurable to other separator).

After the options put the source of your image, it can be relative to your server or absolute: /https://my.storage.io/imgs/pretty-kitten.jpg

So to get a pretty kitten at 250 pixels wide, with 50% compression, you would write. <img src="http://imgs.kitty.com/upload/w_250,q_50/https://my.storage.io/imgs/pretty-kitten.jpg">


Demo Application running

https://demo.flyimg.io

https://demo.flyimg.io/upload/w_300,h_250,c_1,o_jpg/https://flyimg.io/demo-images/Citroen-DS.jpg

resize-test

Community

Adopters

See the ADOPTERS.md file for a list of companies / organisations that are using Flyimg.

Contributors

This project exists thanks to all the people who contributed to it.

Supporters

A special thanks to JetBrains for supporting our project with their open source license program.

Backers

Become a backer and show your support to our open source project on our site.

Sponsors

Does your company use Flyimg? If not, consider asking your manager or marketing team if they would be interested in supporting our project. Their support will help the maintainers dedicate more time to maintenance and develop new features for the community.

Here's the info.

Star History

Star History Chart

License

The AGPL-3.0 License. Please see License File for more information.

Enjoy your Flyimaging!

Frequently asked questions

Is flyimg free to use?

flyimg is open source under the AGPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does flyimg do?

Dockerized application that resizes and crops images on the fly, delivering optimized images in formats such as AVIF, WebP, MozJPEG, or PNG using ImageMagick, w

What is flyimg written in?

flyimg is primarily written in PHP. Its source is publicly available at https://github.com/flyimg/flyimg, and it has 1,229 GitHub stars.