This is a simple image resizer service that accepts a URL to an image and resizes it to a specified width while maintaining the aspect ratio. The resized image can be accessed through a web interface.
- Make sure you have Docker installed on your system.
- Clone this repository to your local machine.
- Navigate to the cloned repository directory.
To build the Docker image, run the following command:
make build
To run the Docker container and start the image resizer service, use the following command:
make run
docker run -d -p 8111:8111 --name image-resizer-container image-resizer
The image resizer service will now be accessible at http://localhost:8111/
.
To resize an image, make an HTTP GET request to the following URL:
http://localhost:8111/?url=<IMAGE_URL>&w=<WIDTH>
Replace <IMAGE_URL>
with the URL of the image you want to resize, and <WIDTH>
with the desired width for the resized image.
Resize an image to a width of 1024 pixels:
http://localhost:8111/?url=http://www.example.com/image.jpg&w=1024
This project is licensed under the MIT License.