From fb02534cd41b8b3d471aea71e5c1a2971f299790 Mon Sep 17 00:00:00 2001 From: zmy Date: Wed, 27 Jan 2021 12:10:24 +0800 Subject: [PATCH] add QA section --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index dfb9276..1a6a488 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,13 @@ python server.py ``` where ```port``` is a int number of which port to use (default: 80), and ```webroot``` is the directory that containing the images(default: current directory). +## 3. Mostly asked problem + +Q1. ```KeyError: webp``` +Ans. We use webp format to encode the image and your system have no libwebp installed. + 1. you can change the format to others by modifying the code ```img = img.save(img_stream, format='webp')``` in server.py/HTTPImageServer.handle_image(line 165) + 2. you can install ```libwebp-dev``` and reinstall pillow package for webp support. + ## 3. Structure. The server.py mainly provides two api. 1. To access filelist under the given directory, please access: