Some time ago, I’ve had a project where I needed to have sets of images in different sizes. That was the only work with images in this project, and I did not want to bother with a complex image editor setup.

So, I’ve decided to create a simple telegram bot for quick image resize.

Telegram: https://t.me/resizerbot.

Github: https://github.com/smyachenkov/resizer_bot.

How it works

First, you need to send an image. Both files and compressed images are supported. After that, you can send your desired dimensions, and the bot will respond with the converted image or images.

Chat example

Implementation

It’s written in Go.

I use the Telebot framework for interactions with Telegram API and the Imaging library for image conversions.

I use GitHub actions to check if this project can be built and to run the tests. After that, it creates a Docker image and pushes it to DockerHub on every commit to the master branch.