Menu

Tree [badf83] master /
 History

HTTPS access


File Date Author Commit
 .github 2022-04-06 DarthSim DarthSim [db2b85] Better caching in GH actions
 .lefthook 2022-07-04 DarthSim DarthSim [c58f04] Versioned docs
 bufpool 2022-07-07 DarthSim DarthSim [c48017] Additional metrics for Datadog
 bufreader 2021-09-30 DarthSim DarthSim [7709b7] Bump version
 config 2022-07-07 DarthSim DarthSim [c48017] Additional metrics for Datadog
 cookies 2021-11-11 DarthSim DarthSim [d8bedf] Polish cookies passthrough
 docker 2022-07-13 DarthSim DarthSim [731218] Fix Docker build again...
 docs 2022-07-26 Sergey Alexandrovich Sergey Alexandrovich [298edd] Update docs
 errorreport 2021-09-30 DarthSim DarthSim [7709b7] Bump version
 etag 2022-07-18 DarthSim DarthSim [d610af] Use require instead of assert in tests
 examples 2021-04-26 Alex Fedoseev Alex Fedoseev [088ffa] Add Rust example (#614)
 heroku 2019-06-18 DarthSim DarthSim [6ce420] Add build arg to Heroku Dockerfile
 ierrors 2021-11-01 DarthSim DarthSim [b98919] Better downloading error reporting cause
 imagedata 2022-04-06 Joe Cai Joe Cai [7a2296] Support OpenStack Swift Object Storage (#837)
 imagemeta 2022-07-18 DarthSim DarthSim [d610af] Use require instead of assert in tests
 imagetype 2022-06-06 Valentine Kiselev Valentine Kiselev [23d080] Add attachment option for Content-Disposition h...
 imath 2022-01-17 DarthSim DarthSim [7a968d] Crop between scale-on-load and scale
 k6 2022-07-13 DarthSim DarthSim [9adf06] Add url groups to k6 script
 logger 2022-03-16 DarthSim DarthSim [a82934] Write logs to STDOUT instead of STDERR
 memory 2021-11-15 DarthSim DarthSim [82c671] Combine new & old build contraints format
 metrics 2022-07-12 DarthSim DarthSim [cf2b3c] requests/images in progress stats and queue tim...
 options 2022-07-18 DarthSim DarthSim [d610af] Use require instead of assert in tests
 processing 2022-07-20 DarthSim DarthSim [20039f] Better error metrics
 reuseport 2021-11-15 DarthSim DarthSim [82c671] Combine new & old build contraints format
 router 2022-07-20 DarthSim DarthSim [20039f] Better error metrics
 security 2022-07-18 DarthSim DarthSim [d610af] Use require instead of assert in tests
 semaphore 2022-07-20 DarthSim DarthSim [526724] Proper semaphore
 structdiff 2021-09-29 DarthSim DarthSim [708404] format_quality processing option
 svg 2022-06-10 DarthSim DarthSim [e1e227] Sanitize SVG
 testdata 2022-07-12 Joe Cai Joe Cai [76897d] Support arithmetic encoded jpeg files (#909)
 transport 2022-06-24 Joe Cai Joe Cai [6f2924] Respond with 404 when the source image can not ...
 version 2022-06-13 DarthSim DarthSim [8a68e7] Bump version
 vips 2022-07-07 DarthSim DarthSim [2661db] Additional metrics for New Relic
 .dockerignore 2022-02-11 DarthSim DarthSim [7e3b83] Use native Go in Docker build
 .gitignore 2022-07-12 DarthSim DarthSim [6d7fc6] k6 script
 .golangci.yml 2021-04-26 DarthSim DarthSim [2ea146] Global refactoring
 BENCHMARK.md 2020-11-20 Andrey Pachay Andrey Pachay [cee746] Update BENCHMARK.md (#505)
 CHANGELOG.md 2022-07-12 DarthSim DarthSim [cf2b3c] requests/images in progress stats and queue tim...
 LICENSE 2017-06-20 Sergey Alexandrovich Sergey Alexandrovich [0c006c] Initial commit
 NOTICE 2021-11-23 DarthSim DarthSim [e781ea] Add CGIF to NOTICE
 README.md 2022-04-04 DarthSim DarthSim [629d25] Update badges in README
 app.json 2019-06-18 DarthSim DarthSim [193402] Fix logo in app.json
 build-docs-sitemap.sh 2022-02-16 DarthSim DarthSim [b75b6c] Add robots.txt and sitemap.txt
 cgo_symbolizer.go 2021-11-15 DarthSim DarthSim [82c671] Combine new & old build contraints format
 cloudbuild.yaml 2022-02-15 DarthSim DarthSim [3997a0] Configure cloudbuild logging
 go.mod 2022-07-07 DarthSim DarthSim [2661db] Additional metrics for New Relic
 go.sum 2022-07-07 DarthSim DarthSim [2661db] Additional metrics for New Relic
 healthcheck.go 2021-11-23 DarthSim DarthSim [1d3706] Fix health command when path prefix is set
 heroku.yml 2019-06-18 DarthSim DarthSim [6ce420] Add build arg to Heroku Dockerfile
 landing.go 2021-09-06 Hampus Kraft Hampus Kraft [8f062a] Fix typo in response header name (#693)
 lefthook.yml 2022-07-04 DarthSim DarthSim [c58f04] Versioned docs
 logo.svg 2019-08-20 DarthSim DarthSim [f0bd65] Optimize logo
 main.go 2022-07-18 DarthSim DarthSim [f368ed] IMGPROXY_PREFERRED_FORMATS config
 netlify.toml 2022-02-16 DarthSim DarthSim [b75b6c] Add robots.txt and sitemap.txt
 pprof.go 2021-11-15 DarthSim DarthSim [82c671] Combine new & old build contraints format
 processing_handler.go 2022-07-12 DarthSim DarthSim [cf2b3c] requests/images in progress stats and queue tim...
 processing_handler_test.go 2022-07-18 DarthSim DarthSim [d610af] Use require instead of assert in tests
 server.go 2022-07-19 DarthSim DarthSim [9c920b] Ser ErrorLog for server

Read Me

imgproxy

GH Test GH Lint Docker Docker Pulls Gitter

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

imgproxy is able to quickly and easily resize images on the fly, and it's well-equipped to handle a large amount of image resizing. imgproxy is a fast, secure replacement for all the image resizing code inside your web application (such as resizing libraries, or code that calls ImageMagick or GraphicsMagic). It's also an indispensable tool for processing images from a remote source. With imgproxy, you don’t need to repeatedly prepare images to fit your design every time it changes.

To get an even better introduction, and to dive deeper into the nitty gritty details, check out this article: 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 takes advantage of probably the most efficient image processing library out there – libvips. It’s scary fast and comes with a very low memory footprint. Thanks to libvips, we can readily and extemporaneously process a massive amount of images.

imgproxy uses Go’s raw (no wrappers) native net/http package to omit any overhead while processing requests and provides the best possible HTTP support.

You can take a look at some benchmarking results and compare imgproxy with some well-known alternatives in our benchmark report.

Security

In terms of security, the massive processing of remote images is a potentially dangerous endeavor. There are a number of possible attack vectors, so it’s a good idea to take an approach that considers attack prevention measures as a priority. Here’s how imgproxy does this:

  • imgproxy checks the image type and its “real” dimensions when downloading. The image will not be fully downloaded if it has an unknown format or if the dimensions are too big (you can set the max allowed dimensions). This is how imgproxy protects from so called "image bombs”, like those described in this doc.

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

  • imgproxy supports authorization by HTTP header. This prevents imgproxy from being used directly by an attacker, but allows it to be used via a CDN or a caching server — simply 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.