Skip to content
/ images Public

Reactive images processing service. Works on RabbitMQ and MongoDB

License

Notifications You must be signed in to change notification settings

WildDev/images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

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

Java CI with Maven Docker Image CI

How it works

  1. Upload an image \ Provide an external link
  2. Get the generated ID
  3. Receive a webhook once the image is ready

Then it may be accessed in this way:

https://test.website/images/find/650f35128d400f39c6a46ee2?width=1024

Examples

Original image (109.31KB):

Original image

[Resize] Width 320px (16.88KB)

Width 320px

[Crop] Width 320px & ratio 1.35 (18.28KB)

Crop to ratio 1.35

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.

Get started

Build requirements:

  • latest JDK and Maven

Runtime stack:

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

About

Reactive images processing service. Works on RabbitMQ and MongoDB

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published