feat: add client-side onerror fallback to default avatar
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
$deptName = $deptVal ?? 'Team';
|
||||
}
|
||||
@endphp
|
||||
<img src="{{ $avatarUrl }}" alt="Avatar" class="w-full h-full object-cover">
|
||||
<img src="{{ $avatarUrl }}" alt="Avatar" class="w-full h-full object-cover" onerror="this.onerror=null; this.src='{{ asset('images/avatar.png') }}';">
|
||||
</div>
|
||||
<div class="hidden sm:flex flex-col leading-tight pr-1">
|
||||
<span class="text-[13px] font-bold text-[#1a2b49] block truncate max-w-[100px]" title="{{ Auth::user()->name }}">{{ Auth::user()->name }}</span>
|
||||
|
||||
Reference in New Issue
Block a user