https://github.com/wilddev/images
Reactive images processing service. Works on RabbitMQ and MongoDB
https://github.com/wilddev/images
batch-processing crop image-cdn image-service resize
Last synced: 3 months ago
JSON representation
Reactive images processing service. Works on RabbitMQ and MongoDB
- Host: GitHub
- URL: https://github.com/wilddev/images
- Owner: WildDev
- License: cc-by-sa-4.0
- Created: 2024-09-22T22:10:07.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-02-11T11:53:42.000Z (4 months ago)
- Last Synced: 2025-02-11T12:39:26.080Z (4 months ago)
- Topics: batch-processing, crop, image-cdn, image-service, resize
- Language: Java
- Homepage:
- Size: 275 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### 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[](https://github.com/WildDev/images/actions/workflows/maven.yml) [](https://github.com/WildDev/images/actions/workflows/docker-image.yml)
### How it works
1. Upload an image \ Provide an external link
2. Get the generated ID
3. Receive a webhook once the image is readyThen it may be accessed in this way:
```
https://test.website/images/find/650f35128d400f39c6a46ee2?width=1024
```### Examples
###### Original image (109.31KB):
###### [Resize] Width 320px (16.88KB)
###### [Crop] Width 320px & ratio 1.35 (18.28KB)
> [!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 MavenRuntime stack:
* Java 20
* MongoDB 6
* RabbitMQ 4
* [rabbitmq-cron](https://github.com/WildDev/rabbitmq-cron)Checkout the project and build it using `mvn package` command
An example run:
```cmd
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 configuredAlso available on [Docker Hub](https://hub.docker.com/r/wilddev/images)