filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
18.52k stars 2.89k forks source link

[2.x] Avatar url in left bottom is wrong #773

Closed webparadoxer closed 2 years ago

webparadoxer commented 2 years ago

Package

filament/filament

Package Version

2.0

Laravel Version

8.75.0

Livewire Version

2.8

PHP Version

8.0.11

Bug description

Avatar url in left bottom is wrong <div class="w-11 h-11 rounded-full bg-gray-200 bg-cover bg-center" style="background-image: url('JRhKLAUF8J8KrvGWc8AieAZSX13c4SpS0unu2yee.jpg')"></div> /storage/ missed

Steps to reproduce

public function getFilamentAvatarUrl(): ?string
{
    return $this->avatar_url;
}

Relevant log output

No response

ryangjchandler commented 2 years ago

@webparadoxer You probably want to do a Storage::url() or something.

webparadoxer commented 2 years ago

but in table all ok, and left corner going from admin template, not me

webparadoxer commented 2 years ago

hmm, and second problem - if clear avatar_url showing ok from ui-avatars.com but nothing in table

webparadoxer commented 2 years ago

https://filamentadmin.com/docs/2.x/admin/users#setting-up-avatars

danharrin commented 2 years ago

You need to wrap your URL in Storage::url() within getFilamentAvatarUrl().

webparadoxer commented 2 years ago

You need to wrap your URL in Storage::url() within getFilamentAvatarUrl().

You need to wrap your URL in Storage::url() within getFilamentAvatarUrl().

but how can show avatars from ui-avatars in table?

ryangjchandler commented 2 years ago

@webparadoxer The ui-avatars are automatically generated.