Dont inline profile image, instead add endpoint to serve it
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
<a class="flex items-center gap-2 text-gray-600 no-underline hover:text-gray-200 hover:text-underline py-2 px-4"
|
||||
href="{{ url_for('user.profile') }}" @click="isOpen = false">
|
||||
{% if current_user.profile and current_user.profile.profile_pic %}
|
||||
<img src="data:image/png;base64,{{ current_user.profile.profile_pic }}" alt="Profile Picture"
|
||||
<img src="{{ url_for('user.profile_image', user_id=current_user.id) }}" alt="Profile Picture"
|
||||
class="w-8 h-8 rounded-full border-2 border-white object-cover group-hover:scale-105 transition">
|
||||
{% else %}
|
||||
<!-- Default SVG Icon -->
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<div class="flex items-center justify-center mb-4">
|
||||
{% if profile.profile_pic %}
|
||||
<img src="data:image/jpeg;base64,{{ profile.profile_pic }}" alt="Profile Picture"
|
||||
<img src="{{ url_for('user.profile_image', user_id=current_user.id) }}" alt="Profile Picture"
|
||||
class="w-24 h-24 rounded-full border">
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='default.png') }}" alt="Default Profile Picture"
|
||||
|
||||
Reference in New Issue
Block a user