jeffgreco13 / filament-breezy

MIT License
735 stars 131 forks source link

The Profile Image on Right top vanishes #221

Closed bhattji closed 1 year ago

bhattji commented 1 year ago

When I upload the Avatar Image, it does get uploaded, but the round image in top-right vanishes

without-avatar-image with-avatar-image
jeffgreco13 commented 1 year ago

This is a misconfiguration in your User Avatar method and isn't an issue with Breezy: https://filamentphp.com/docs/3.x/panels/users#setting-up-user-avatars

Try this example:

use Illuminate\Support\Facades\Storage;
use Filament\Models\Contracts\HasAvatar;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable implements FilamentUser, HasAvatar
{
    // ...

    public function getFilamentAvatarUrl(): ?string
    {
        return $this->avatar_url ? Storage::url($this->avatar_url) : null ;
    }
}
bhattji commented 1 year ago

Excellent,

I was/am afraid of trying the Filament3 being it beta, but only because of your this component, I am now switching to.

jeffgreco13 commented 1 year ago

Filament v3 is quite reliable, even though Livewire v3 is still in beta. I would suggest you join the Discord channel as there are many helpful tips there. Glad I can help and that you enjoy Breezy!

(closing this issue)