Shrink profile pic
This commit is contained in:
@@ -33,7 +33,7 @@ def profile():
|
|||||||
try:
|
try:
|
||||||
image = Image.open(io.BytesIO(file_data))
|
image = Image.open(io.BytesIO(file_data))
|
||||||
image = image.convert("RGB") # Ensure it's in RGB format
|
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
|
# Save the resized image to a buffer
|
||||||
buffer = io.BytesIO()
|
buffer = io.BytesIO()
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<div class="flex items-center justify-center mb-4">
|
<div class="flex items-center justify-center mb-4">
|
||||||
<img src="{{ url_for('user.profile_image', user_id=current_user.id) }}" alt="Profile Picture"
|
<img src="{{ url_for('user.profile_image', user_id=current_user.id) }}" alt="Profile Picture"
|
||||||
class="w-44 h-44 rounded-full border object-cover shadow">
|
class="w-32 h-32 rounded-full border object-cover shadow">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user