Installing Thumbor on Void Linux

Thumbor is an open-source tool used for resizing, cropping, and filtering images. It can be used in many web applications to manipulate images on the fly. Here's a step-by-step guide on how to install Thumbor on Void Linux.

Requirements

Before proceeding with the installation, ensure that you have the following:

  • A Void Linux machine or Virtual Machine
  • Access to the internet

Installation

  1. Open the terminal and update the package manager through the command below.
sudo xbps-install -Syu
  1. Install the dependencies necessary to install Thumbor.
sudo xbps-install -S libjpeg-turbo-devel libwebp-devel libpng-devel
  1. Install the Python package manager - pip.
sudo xbps-install -S python3-pip
  1. Install Thumbor using pip.
sudo pip3 install thumbor
  1. Verify that Thumbor is installed correctly by checking the version.
thumbor -v

You should see the version number printed on the command line.

Configuration

Next, you'll configure Thumbor to start using it.

  1. Create a configuration file for Thumbor.
sudo mkdir /etc/thumbor && touch /etc/thumbor/thumbor.conf
  1. Edit the configuration file to set the appropriate parameters you desire. Below is an example configuration file.
[thumbor]
keyfile = /etc/thumbor/thumbor.key
security_key = MY_SECURE_PASSWORD
allow_unsafe_url = True
max_age = 604800
result_storage_store_on_s3 = False
result_storage_file_storage_root_path = /srv/www/thumbnails/thumbor
result_storage_file_storage_root_url = http://127.0.0.1/media/thumbnails/thumbor

## running options
port = 8888
address = 127.0.0.1
with_metrics = True
metrics_port = 3030

## Engines configuration
# ENGINE webp
# ENGINE gifsicle
# ENGINE jpegtran
# ENGINE pngcrush
# ENGINE pngquant
# ENGINE optipng
# IMAGE LOADER filesystem
# DETECTORS face_detector
# RESULT STORAGE file_storage
  1. Start Thumbor using the configuration file you created above.
thumbor -c /etc/thumbor/thumbor.conf

Thumbor should now be running, and you can access it by visiting http://localhost:8888.

Conclusion

Thumbor is now installed and ready to use on your Void Linux machine. You can now use Thumbor to resize, crop, and filter images as desired.