This is a simple service for proxying external images for the purpose of subsequent optimization or conversion.
The service allows you to change the aspect ratio of the image by transferring the mode and size
http://example.com/?image={imageURL}&mode=resize&width=150&height=150
Parameters width or height optional.
The service allows you to crop the image indicating the aspect ratio of the image
http://example.com/?image={imageURL}&mode=crop&width=150&height=150
Parameters width or height optional.
Thanks to the package spatie/image-optimizer the service optimizes the image size with minimal loss of quality
http://example.com/?image={imageURL}&optimize
Thanks to the package rosell-dk/webp-convert, the service has the ability to convert the image to webp format
http://example.com/?image={imageURL}&webp
All query parameters can be used both together and optionally.
The service performs actions on the image sequentially, the strategy for working with the image is determined by a set of specified parameters and request add-ons.
The service provides simple protection against unauthorized use.
To be able to download images from a remote server, you must register the domain in the list of allowed in the file security.php
The service has a simple configuration for quick deployment. To work you need a docker, docker-compose
docker-compose up -d
*Service will be launched by default on port 8080