Skip to content

Commit 70b606d

Browse files
committed
Support imgproxy v3
Fix #41
1 parent baad0f1 commit 70b606d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backend/flask/app/imgproxy.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ def generate_url(original_url):
1616
# You can trim padding spaces to get good-looking url
1717
encoded_url = '/'.join(textwrap.wrap(encoded_url, 16))
1818

19-
path = '/{resize}/{width}/{height}/{gravity}/{enlarge}/{encoded_url}'.format(
19+
path = '/resize:{resizing_type}:{width}:{height}:{enlarge}/{encoded_url}'.format(
2020
encoded_url=encoded_url,
21-
resize='fit',
21+
resizing_type='fit',
2222
width=100,
2323
height=100,
24-
gravity='ce',
2524
enlarge=0,
2625
).encode()
2726
digest = hmac.new(key, msg=salt+path, digestmod=hashlib.sha256).digest()

0 commit comments

Comments
 (0)