This is a reactive images processing service that may be used to enpower your apps with the images support. It allows to maintain a number of image versions to be rendered on various devices just like desktops, phones or tables
- Upload an image \ Provide an external link
- Get the generated ID
- Receive a webhook once the image is ready
Then it may be accessed in this way:
https://test.website/images/find/650f35128d400f39c6a46ee2?width=1024
Note
In order to crop an image the service will first try to resize it. Once the resized copy covers the target dimensions the cropping is performed. Use this mode to create image previews.
Build requirements:
- latest JDK and Maven
Runtime stack:
- Java 20
- MongoDB 6
- RabbitMQ 4
- rabbitmq-cron
Checkout the project and build it using mvn package
command
An example run:
java -jar -Xmx512M target/images.jar \
--server.port=8000 \
--spring.cors.allowed-origins=http://image-uploader-1:8080,https://test.website \
--spring.data.mongodb.host=mongodb \
--spring.data.mongodb.username=images \
--spring.data.mongodb.password=test \
--spring.rabbitmq.host=rabbitmq \
--spring.rabbitmq.username=images \
--spring.rabbitmq.password=test \
--image.processor.tasks=CROP \
--webhook.url=http://image-uploader-1:8080/images/webhook
Warning
Ensure that rabbitmq-cron
service runs on the same RabbitMQ username and initially was launched first
Warning
The service is unprotected by default! Ensure the only accessor endpoint is publicly available and your proxy server is properly configured
Also available on Docker Hub