This is simple image thumbnail HTTP server.
He generates image previews or returns existing ones based on the specified parameters in the configuration file.
- config.toml
base_dir = "/your/path/to/base_directory"
sizes = ["300x200", "100x100"]
- You have only image.jpg source file
base_directory
└── recipies_image
└── image.jpg // Source Image [Any size]
- After request to
YOUR_DOMAIN/recipies_image/300x200/image.jpg
base_directory
└── recipies_image
├── 300x200
| └── image.jpg // Image [300x200]
└── image.jpg // Source Image [Any size]
Requests return 404
- incorect size
YOUR_DOMAIN/recipies_image/123x321/image.jpg> 404 - not found image
YOUR_DOMAIN/recipies_image/300x200/image2.jpg> 404
cargo build -r
- -c: path to config file [conf.toml]
- -p: port for listen HTTP request [default:4000]
thumb_server -c ./conf.toml -p 1234
cargo tests
cargo bench