From 1f9e49b81547295c27790613b57dfb9992ebac9e Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Thu, 24 Jun 2021 18:15:09 +0200 Subject: [PATCH] readme --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..714435d --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# python-flask picture factory +This server provides and caches images based on url-arguments. + +# Ussage +Place your images in the "/pictures/"-subdirectory. + + ../pictures + ├── picture1.png + ├── picture2.jpg + ├── picture3 + +Run the server, either as: + + python ./server + +or: + + /usr/bin/waitress-serve --host 127.0.0.1 --port 5002 --call 'app:createApp'* + +Retrive the images with these URLs: + + http://server:port/media/picture1.png?x=100&y=200&encoding=webp + http://server:port/media/picture2.jpg?x=100 + http://server:port/media/picture3.jpg?y=200&encoding=png + +You may omitt any of the parameters. Not giving any parameters will return the original image. You must always name the original picture in your URL, even if you want a different encoding. + +# Futher explanation +I wrote a small article with some more example on how to best use this to optimize your website -if you want to use it for that: [Medium](https://medium.com/anti-clickbait-coalition/responsive-image-factory-f1ed6e61d13c)