imgproxy — Fast Secure Image Processing Server in Go
Resize, crop, and convert images on-the-fly with imgproxy. A blazing-fast Go server powered by libvips for production-grade image transformation at scale.
What it is
imgproxy is a standalone image processing server written in Go and powered by libvips. It resizes, crops, and converts images on-the-fly via URL parameters, eliminating the need for pre-generated image variants. You point it at your source images (S3, GCS, local filesystem), and it serves transformed versions in real time.
Frontend developers, platform engineers, and content teams use imgproxy to deliver optimized images without maintaining a build pipeline for every size and format combination.
How it saves time or tokens
imgproxy removes the need to pre-generate dozens of image variants (thumbnails, retina, WebP, AVIF) at upload time. Instead, you request the exact dimensions and format you need via URL parameters, and imgproxy generates them on demand with caching. This eliminates storage bloat and the engineering overhead of image processing pipelines.
How to use
- Deploy imgproxy using Docker with your image source configuration (S3 bucket, local path, or HTTP origin).
- Construct URLs with transformation parameters (resize, crop, format) following the imgproxy URL format.
- Point your frontend image tags or CDN origin to the imgproxy endpoint.
Example
# Run imgproxy with Docker
docker run -p 8080:8080 \
-e IMGPROXY_USE_S3=true \
-e AWS_ACCESS_KEY_ID=your_key \
-e AWS_SECRET_ACCESS_KEY=your_secret \
darthsim/imgproxy
# URL format for resizing an image
http://localhost:8080/insecure/rs:fill:300:200/plain/s3://my-bucket/photos/original.jpg@webp
# Resize to 300x200, fill mode, convert to WebP
# rs: = resize, fill = crop to fit, @webp = output format
Related on TokRepo
- AI Tools for Design — Image and design tools for developers
- AI Tools for Self-Hosted — Self-hosted infrastructure tools
Common pitfalls
- Not enabling URL signing in production, which allows anyone to generate arbitrary transformations and potentially overload your server.
- Forgetting to set memory limits, since processing very large images can consume significant RAM.
- Serving imgproxy directly without a CDN in front, which defeats the purpose of on-the-fly generation by reprocessing the same image on every request.
Frequently Asked Questions
imgproxy is self-hosted and open source, so you control your infrastructure and pay no per-image fees. Cloudinary and Imgix are SaaS products with built-in CDNs and more transformation options. Choose imgproxy when you want full control and cost predictability.
imgproxy supports JPEG, PNG, WebP, AVIF, GIF, TIFF, BMP, and ICO for input. Output formats include JPEG, PNG, WebP, and AVIF. Format conversion happens automatically based on URL parameters.
imgproxy itself does not cache, but it sets proper Cache-Control headers. You should place a CDN or reverse proxy (Nginx, Varnish) in front of imgproxy to cache processed images at the edge.
imgproxy can rasterize SVG files to bitmap formats. However, SVG processing has security implications, so it is disabled by default and must be explicitly enabled in the configuration.
Yes. imgproxy is used in production by many organizations. It is built on libvips, which is the fastest image processing library available, and the Go server handles concurrent requests efficiently with low memory overhead.
Citations (3)
- imgproxy GitHub— Go server powered by libvips for image processing
- imgproxy Documentation— On-the-fly image resizing and format conversion
- imgproxy Getting Started— URL-based image transformation API
Related on TokRepo
Discussion
Related Assets
Cucumber.js — BDD Testing with Plain Language Scenarios
Cucumber.js is a JavaScript implementation of Cucumber that runs automated tests written in Gherkin plain language.
WireMock — Flexible API Mocking for Java and Beyond
WireMock is an HTTP mock server for stubbing and verifying API calls in integration tests and development.
Google Benchmark — Microbenchmark Library for C++
Google Benchmark is a library for measuring and reporting the performance of C++ code with statistical rigor.