1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-04-12 06:58:15 +02:00
imgproxy/docs/GETTING_STARTED.md
2018-10-04 19:16:51 +06:00

2.0 KiB

Getting started

This guide will show you how to quickly get you first image resized with imgproxy.

Install

Let's assume you have Docker installed on your machine. Then you can just pull official imgproxy 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.

Deploy

Check out our installation guide for more details and instructions.

That's it! No further configuration is needed, but if you want to unleash the full power of imgproxy, read our configuration guide.

Resize an image

After you installed imgproxy, you can use the following URL to get the resized image of Matt Damon from "The Martian" movie (replace localhost:8080 with your domain if you installed imgproxy on a remote server): http://localhost:8080/insecure/fill/300/400/sm/0/aHR0cHM6Ly9tLm1l/ZGlhLWFtYXpvbi5j/b20vaW1hZ2VzL00v/TVY1Qk1tUTNabVk0/TnpZdFkyVm1ZaTAw/WkRSbUxUZ3lPREF0/WldZelpqaGxOemsx/TnpVMlhrRXlYa0Zx/Y0dkZVFYVnlOVGMz/TWpVek5USUAuanBn.jpg

The original image is resized to fill 300x400 with smart gravity. libvips chose the most interesting part of the image.

Get more info about generation imgproxy URLs in the Generating the URL guide.

Security

Note that this URL is not signed. It's highly recommended to sign URLs in production. Read our Signing the URL guide to know how to secure your imgproxy from attackers.