1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00
Fast and secure standalone server for resizing and converting remote images
Go to file
2021-11-23 15:11:39 +06:00
.circleci Update CircleCI config & image 2021-09-29 19:12:09 +06:00
.github Add Github action to notify imgproxy-helm about updates (#634) 2021-06-23 15:49:50 +06:00
.lefthook Always run tests on push 2019-09-19 19:47:04 +06:00
bufpool Bump version 2021-09-30 20:23:30 +06:00
bufreader Bump version 2021-09-30 20:23:30 +06:00
config Fix default Sentry release 2021-11-23 15:11:39 +06:00
cookies Polish cookies passthrough 2021-11-11 15:30:32 +06:00
docker Add libpcre3 to Docker image 2021-11-23 00:07:41 +06:00
docs Fix default Sentry release 2021-11-23 15:11:39 +06:00
errorreport Bump version 2021-09-30 20:23:30 +06:00
etag Stabilize etag tests 2021-09-30 22:00:28 +06:00
examples Merge branch 'master' into version/3 2021-05-17 18:25:04 +06:00
heroku Add build arg to Heroku Dockerfile 2019-06-18 20:49:26 +06:00
ierrors Better downloading error reporting cause 2021-11-01 18:29:26 +06:00
imagedata Add option to pass through incoming cookies in the image request. 2021-11-09 12:14:05 +01:00
imagemeta Bump version 2021-09-30 20:23:30 +06:00
imagetype Escape quotes in content disposition 2021-11-23 13:32:42 +06:00
imath Global refactoring 2021-05-07 17:10:21 +06:00
logger Bump version 2021-09-30 20:23:30 +06:00
memory Combine new & old build contraints format 2021-11-15 16:42:36 +06:00
metrics Check if Prometheus is enabled in prometheus.AddGaugeFunc 2021-11-15 17:26:49 +06:00
options Fix Client Hints behavior 2021-10-12 16:56:03 +06:00
processing Fix scale recalculation after scale-on-load 2021-11-01 19:45:45 +06:00
reuseport Combine new & old build contraints format 2021-11-15 16:42:36 +06:00
router Bump version 2021-09-30 20:23:30 +06:00
security Bump version 2021-09-30 20:23:30 +06:00
structdiff format_quality processing option 2021-09-29 19:49:18 +06:00
testdata Global refactoring 2021-05-07 17:10:21 +06:00
transport Bump version 2021-09-30 20:23:30 +06:00
version Bump version 2021-11-15 18:07:16 +06:00
vips Use "effort" in vips_avifsave_go 2021-11-23 00:16:28 +06:00
.dockerignore Use golang:1-alpine3.10 for docker build 2019-10-03 18:13:06 +06:00
.gitignore Update .gitignore 2020-06-15 19:52:48 +06:00
.golangci.yml Global refactoring 2021-05-07 17:10:21 +06:00
app.json Fix logo in app.json 2019-06-18 20:52:05 +06:00
BENCHMARK.md Update BENCHMARK.md (#505) 2020-11-20 10:43:59 +06:00
cgo_symbolizer.go Combine new & old build contraints format 2021-11-15 16:42:36 +06:00
CHANGELOG.md Save GIF with vips_gifsave_buffer 2021-11-23 00:12:59 +06:00
go.mod New build contraints format 2021-11-15 15:54:06 +06:00
go.sum Bump deps 2021-11-11 16:25:01 +06:00
healthcheck.go Fix health command when path prefix is set 2021-11-23 15:09:50 +06:00
heroku.yml Add build arg to Heroku Dockerfile 2019-06-18 20:49:26 +06:00
landing.go Fix typo in response header name (#693) 2021-09-06 15:47:10 +06:00
lefthook.yml Add lefthook 2019-08-20 19:45:52 +06:00
LICENSE Initial commit 2017-06-20 17:00:17 +03:00
logo.svg Optimize logo 2019-08-20 16:49:26 +06:00
main.go Proper cli command detection 2021-11-15 15:54:00 +06:00
netlify.toml Netlify docs 2021-06-23 14:36:04 +06:00
NOTICE Add CGIF to NOTICE 2021-11-23 13:13:51 +06:00
pprof.go Combine new & old build contraints format 2021-11-15 16:42:36 +06:00
processing_handler_test.go Stabilize etag tests 2021-09-30 22:00:28 +06:00
processing_handler.go Polish cookies passthrough 2021-11-11 15:30:32 +06:00
README.md Fix link to Alexander Madyankin's github (#699) 2021-09-13 17:42:22 +06:00
server.go Bump version 2021-09-30 20:23:30 +06:00

imgproxy

CircleCI branch Docker Docker Pulls Gitter

imgproxy is a fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security.

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.

See this article for a good intro and all the juicy details! imgproxy: Resize your images instantly and securely

Sponsored by Evil Martians

Simplicity

"No code is better than no code."

imgproxy only includes the must-have features for image processing, fine-tuning and security. Specifically,

  • 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.

Speed

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.

imgproxy also uses native Go's net/http routing for the best HTTP networking support.

You can see benchmarking results and comparison with some well-known alternatives in our benchmark report.

Security

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:

  • 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.

  • imgproxy protects image URLs with a signature, so an attacker cannot cause a denial-of-service attack by requesting multiple image resizes.

  • 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.

Usage

Check out our 📑 Documentation.

Author

Sergey "DarthSim" Alexandrovich

Special thanks

Many thanks to:

License

imgproxy is licensed under the MIT license.

See LICENSE for the full license text.

Security Contact

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.