1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00
imgproxy/README.md

78 lines
5.1 KiB
Markdown
Raw Normal View History

2017-07-05 09:16:11 +02:00
# imgproxy
2017-06-20 15:57:12 +02:00
2017-09-21 09:10:27 +02:00
<img align="right" width="200" height="200" title="imgproxy logo"
src="https://cdn.rawgit.com/DarthSim/imgproxy/master/logo.svg">
2018-11-19 13:52:21 +02:00
2020-05-13 17:38:23 +02:00
[![CircleCI branch](https://img.shields.io/circleci/project/github/imgproxy/imgproxy/master.svg?logo=circleci&style=for-the-badge)](https://circleci.com/gh/imgproxy/imgproxy) [![Docker](https://img.shields.io/badge/docker-darthsim%2Fimgproxy-blue.svg?logo=docker&logoColor=white&style=for-the-badge)](https://hub.docker.com/r/darthsim/imgproxy/) [![Docker Pulls](https://img.shields.io/docker/pulls/darthsim/imgproxy.svg?logo=docker&logoColor=white&style=for-the-badge)](https://hub.docker.com/r/darthsim/imgproxy/) [![Gitter](https://img.shields.io/gitter/room/imgproxy/imgproxy?logo=gitter&style=for-the-badge)](https://gitter.im/imgproxy/imgproxy)
2018-09-10 10:28:58 +02:00
2017-09-27 21:25:51 +02:00
2017-07-05 09:16:11 +02:00
imgproxy is a fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security.
2017-07-04 14:17:20 +02:00
2017-07-05 09:16:11 +02:00
imgproxy can be used to provide a fast and secure way to replace all the image resizing code of your web application (like calling ImageMagick or GraphicsMagick, or using libraries), while also being able to resize everything on the fly, fast and easy. imgproxy is also indispensable when handling lots of image resizing, especially when images come from a remote source.
imgproxy does one thing — resizing remote images — and does it well. It works great when you need to resize multiple images on the fly to make them match your application design without preparing a ton of cached resized images or re-doing it every time the design changes.
imgproxy is a Go application, ready to be installed and used in any Unix environment — also ready to be containerized using Docker.
2019-10-21 14:38:04 +02:00
See this article for a good intro and all the juicy details! [imgproxy: Resize your images instantly and securely](https://evilmartians.com/chronicles/introducing-imgproxy)
2017-10-20 12:33:52 +02:00
2017-07-05 09:16:11 +02:00
<a href="https://evilmartians.com/?utm_source=imgproxy">
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians_v2.0.svg" alt="Sponsored by Evil Martians" width="236" height="54">
2017-07-04 14:17:20 +02:00
</a>
2017-06-20 15:57:12 +02:00
2017-07-04 14:17:20 +02:00
#### Simplicity
2017-07-05 09:16:11 +02:00
> "No code is better than no code."
imgproxy only includes the must-have features for image processing, fine-tuning and security. Specifically,
2017-07-03 06:08:47 +02:00
2017-07-05 09:16:11 +02:00
* It would be great to be able to rotate, flip and apply masks to images, but in most of the cases, it is possible — and is much easier — to do that using CSS3.
* It may be great to have built-in HTTP caching of some kind, but it is way better to use a Content-Delivery Network or a caching proxy server for this, as you will have to do this sooner or later in the production environment.
* It might be useful to have everything built in — such as HTTPS support — but an easy way to solve that would be just to use a proxying HTTP server such as nginx.
2017-07-03 06:08:47 +02:00
#### Speed
2017-07-05 09:16:11 +02:00
imgproxy uses probably the most efficient image processing library there is, called `libvips`. It is screaming fast and has a very low memory footprint; with it, we can handle the processing for a massive amount of images on the fly.
2017-07-03 06:08:47 +02:00
imgproxy also uses native Go's `net/http` routing for the best HTTP networking support.
2017-07-03 06:08:47 +02:00
2019-10-18 11:56:20 +02:00
You can see benchmarking results and comparison with some well-known alternatives in our [benchmark report](https://github.com/imgproxy/imgproxy/blob/master/BENCHMARK.md).
2019-05-08 12:45:47 +02:00
2017-07-03 06:08:47 +02:00
#### Security
2017-07-05 09:16:11 +02:00
Massive processing of remote images is a potentially dangerous thing, security-wise. There are many attack vectors, so it is a good idea to consider attack prevention measures first. Here is how imgproxy can help:
2017-07-03 06:08:47 +02:00
2017-07-05 09:16:11 +02:00
* imgproxy checks image type _and_ "real" dimensions when downloading, so the image will not be fully downloaded if it has an unknown format or the dimensions are too big (there is a setting for that). That is how imgproxy protects you from so called "image bombs" like those described at https://www.bamsoftware.com/hacks/deflate.html.
2017-07-03 06:08:47 +02:00
2017-07-05 09:16:11 +02:00
* imgproxy protects image URLs with a signature, so an attacker cannot cause a denial-of-service attack by requesting multiple image resizes.
2017-07-03 06:08:47 +02:00
2017-07-05 09:16:11 +02:00
* imgproxy supports authorization by an HTTP header. That prevents using imgproxy directly by an attacker but allows to use it through a CDN or a caching server — just by adding a header to a proxy or CDN config.
2017-06-26 00:20:48 +02:00
2021-01-18 17:53:44 +02:00
## Usage
Check out our 📑 [Documentation](https://docs.imgproxy.net).
2017-07-04 14:17:20 +02:00
## Author
2019-12-03 16:01:40 +02:00
Sergey "[DarthSim](https://github.com/DarthSim)" Alexandrovich
2018-10-04 14:59:57 +02:00
2019-12-03 16:01:40 +02:00
## Special thanks
2017-07-04 14:17:20 +02:00
2019-12-03 16:01:40 +02:00
Many thanks to:
* [Roman Shamin](https://github.com/romashamin) for the awesome logo.
* [Alena Kirdina](https://github.com/egodyston) and [Alexander Madyankin](https://github.com/madyankin) for the great website.
2019-12-03 16:01:40 +02:00
* [John Cupitt](https://github.com/jcupitt) who develops [libvips](https://github.com/libvips/libvips) and helps me to optimize its usage under the hood of imgproxy.
2020-02-05 16:34:28 +02:00
* [Kirill Kuznetsov](https://github.com/dragonsmith) for the [Helm chart](https://github.com/imgproxy/imgproxy-helm).
2017-09-27 21:25:51 +02:00
2017-07-04 14:17:20 +02:00
## License
2017-07-05 09:16:11 +02:00
imgproxy is licensed under the MIT license.
2017-07-04 14:17:20 +02:00
See LICENSE for the full license text.
2019-10-16 11:50:09 +02:00
## Security Contact
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.