This guide will show you how to quickly resize your first image using imgproxy.
Let's assume you already have Docker installed on your machine — you can pull an official imgproxy Docker image, and you’re done!
docker pull darthsim/imgproxy:latest
docker run -p 8080:8080 -it darthsim/imgproxy
If you don't have docker, you can use Heroku for a quick start.
Check out our installation guide for more details and instructions.
In both cases, that's it! No further configuration is needed, but if you want to unleash the full power of imgproxy, read our configuration guide.
After you’ve successfully installed imgproxy, a good first step is to make sure that everything is working correctly. To do that, you can use the following URL to get a resized image of Matt Damon from “The Martian” (replace localhost:8080
with your domain if you’ve installed imgproxy on a remote server):
Just for reference, here’s the original image. Using the URL above, imgproxy is instructed to resize it to fill an area of 300x400
size with “smart” gravity. “Smart” means that the libvips
library chooses the most “interesting” part of the image.
You can learn more on how to generate imgproxy URLs in the Generating the URL guide.
Note that the URL in the above example is not signed. However, it’s highly recommended to use signed URLs in production. Read our Signing the URL guide to learn how to secure your imgproxy installation from attackers.