Shrink profile pic
This commit is contained in:
@@ -33,7 +33,7 @@ def profile():
|
||||
try:
|
||||
image = Image.open(io.BytesIO(file_data))
|
||||
image = image.convert("RGB") # Ensure it's in RGB format
|
||||
image.thumbnail((300, 300)) # Resize to a maximum of 300x300 pixels
|
||||
image.thumbnail((200, 200)) # Resize to a maximum of 200x200 pixels
|
||||
|
||||
# Save the resized image to a buffer
|
||||
buffer = io.BytesIO()
|
||||
|
||||
Reference in New Issue
Block a user