imgproxy is a fast and secure image processing service that provides image resizing, cropping, and water-marking. It's a standalone server that can be integrated with your application to serve images on user requests.
In this tutorial, we will show you how to install imgproxy on Linux Mint latest version.
Before starting with the installation, make sure your system is updated and install the following packages:
curl
unzip
zlib1g-dev
libjpeg-dev
libpng-dev
libgif-dev
libvips-dev
You can do this by running the following command:
sudo apt-get update
sudo apt-get install curl unzip zlib1g-dev libjpeg-dev libpng-dev libgif-dev libvips-dev
The first step is to download imgproxy. You can get the latest version from their website or GitHub.
curl -OL https://github.com/imgproxy/imgproxy/releases/download/v2.15.0/imgproxy-linux-amd64-v2.15.0.tar.gz
Extract the downloaded file:
tar -xzf imgproxy-linux-amd64-v2.15.0.tar.gz
Move the extracted binaries to /usr/local/bin:
sudo mv imgproxy-linux-amd64 /usr/local/bin/imgproxy
Change the permission of the binary:
sudo chmod +x /usr/local/bin/imgproxy
Next, you need to create an imgproxy configuration file. You can create the config file by running the following command:
sudo nano /etc/imgproxy.conf
And add the following configuration:
listen: ":8080"
cache:
type: "memory"
items: 1024
source:
url: "https://example.com"
secret: "YourSecretKey"
preserve_extension: true
headers:
User-Agent: "My User Agent"
Note: Replace https://example.com with your website URL and YourSecretKey with a secret key that you will be using to generate the image URLs.
Finally, you can start the imgproxy service by running the following command:
sudo imgproxy -config /etc/imgproxy.conf
This will start the imgproxy service on port 8080.
Now you can access imgproxy service by visiting http://localhost:8080
.
In this tutorial, we have shown you how to install imgproxy on Linux Mint latest version. imgproxy is a powerful tool that can improve your website's performance by serving optimized and resized images.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!