diff --git a/README.md b/README.md index e7c898c9..8cf5dcd7 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Reserved URL characters can be included using escape patterns: Emojis are also supported, both as characters (👍) and aliases (`:thumbsup:`). -For example, produces: +For example, produces: ![Escaped Characters](https://api.memegen.link/images/ugandanknuck/~hspecial_characters~q/underscore__-dash--_%F0%9F%91%8D.png?token=0wzowe01f5oxdtaqz21i) diff --git a/app/settings.py b/app/settings.py index 4b148f80..e54ddcb0 100644 --- a/app/settings.py +++ b/app/settings.py @@ -38,8 +38,8 @@ ALLOWED_EXTENSIONS = {"gif", "jpg", "jpeg", "png", "webp"} ANIMATED_EXTENSIONS = {"gif", "webp"} -DEFAULT_STATIC_EXTENSION = os.environ.get("DEFAULT_STATIC_EXTENSION", "png") -DEFAULT_ANIMATED_EXTENSION = os.environ.get("DEFAULT_ANIMATED_EXTENSION", "gif") +DEFAULT_STATIC_EXTENSION = "png" +DEFAULT_ANIMATED_EXTENSION = "webp" DEFAULT_SUFFIX = "." + DEFAULT_STATIC_EXTENSION PLACEHOLDER_SUFFIX = ".img" diff --git a/app/tests/test_views_images.py b/app/tests/test_views_images.py index f29776fe..494a8fd3 100644 --- a/app/tests/test_views_images.py +++ b/app/tests/test_views_images.py @@ -72,7 +72,7 @@ def it_removes_redundant_styles(expect, client): "url": "http://localhost:5000/images/iw/foo/bar.png?style=default,test&font=impact" } - def it_returns_gif_when_animated(expect, client): + def it_returns_webp_when_animated(expect, client): data = { "template_id": "iw", "text_lines[]": ["foo", "bar"], @@ -81,7 +81,7 @@ def it_returns_gif_when_animated(expect, client): request, response = client.post("/images", data=data) expect(response.status) == 201 expect(response.json) == { - "url": "http://localhost:5000/images/iw/foo/bar.gif" + "url": "http://localhost:5000/images/iw/foo/bar.webp" } def it_prefers_extension_over_animated_style(expect, client):