From 5d7895f5d224bc74a389cd168731a9823c45e2fc Mon Sep 17 00:00:00 2001 From: Robohash <401330+e1ven@users.noreply.github.com> Date: Wed, 11 Jun 2025 21:36:20 -0400 Subject: [PATCH] allow webp --- robohash/robohash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robohash/robohash.py b/robohash/robohash.py index 6ebe770..b0541a9 100644 --- a/robohash/robohash.py +++ b/robohash/robohash.py @@ -65,7 +65,7 @@ class Robohash: # We'll remove them from the string before hashing. # This ensures that /Bear.png and /Bear.bmp will send back the same image, in different formats. - if string.lower().endswith(('.png','.gif','.jpg','.bmp','.jpeg','.ppm','.datauri')): + if string.lower().endswith(('.png','.gif','.jpg','.bmp','.jpeg','.ppm','.datauri','.webp')): format_str = string[string.rfind('.') + 1:] if format_str.lower() == 'jpg': format_str = 'jpeg'