1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-12-09 09:56:01 +02:00
imgproxy/docs/GETTING_STARTED.md
Travis-Turner c51521961f
Docs/edits overhaul (#785)
* Update landing page / README.md

* Update GETTING_STARTED.md

* Update installation.md

* Update getting_the_image_info.md

* update signing_the_url.md

* Update watermark.md

* Update presets.md

* Update object_detection.md

* Update autoquality.md

* Update serving_local_files.md

* Update docs/serving_files_from_s3.md

* Update configuration.md

* Update generating_the_url.md

* Update chained_pipelines.md but chained pipelines section is not finished

* Update serving_files_from_google_cloud_storage.md

* Update new_relic.md

* Update prometheus.md

* Update datadog.md

* Update image_formats_support.md

* Update about_processing_pipeline.md

* Update healthcheck.md

* Update memory_usage_tweaks.md

* Remove GIF/ICO/BMP/HEIF/AVIF support sections from docs/image_formats_support.md

* Minor fixes of the docs

* Update serving_files_from_azure_blob_storage.md

* Fix issue with x and y offset for 're' watermark property

* Fix params description in docs/watermark.md

* Fix Alexander Madyankin GH name

* Special thanks to Travis

* Fix README

Co-authored-by: DarthSim <darthsim@gmail.com>
2022-02-01 15:43:36 +06:00

2.3 KiB

Getting started

This guide will show you how to quickly resize your first image using imgproxy.

Install

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.

Deploy

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.

Resize an image

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):

http://localhost:8080/insecure/rs:fill:300:400/g:sm/aHR0cHM6Ly9tLm1l/ZGlhLWFtYXpvbi5j/b20vaW1hZ2VzL00v/TVY1Qk1tUTNabVk0/TnpZdFkyVm1ZaTAw/WkRSbUxUZ3lPREF0/WldZelpqaGxOemsx/TnpVMlhrRXlYa0Zx/Y0dkZVFYVnlOVGMz/TWpVek5USUAuanBn.jpg

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.

Security

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.