Display user avatar with ImageColumn
I want to display the avatar for my users.
I added HasAvatars to the User model and all but ImageColumn::make('avatar_url') returns nothing.
It's supposed to return the generated ui-avatars if the avatar_url is null right ?
I'm lost.
3 Replies
same
ImageColumn not suport Image url only from disk
Tables\Columns\ImageColumn::make('anyNameNotExistInMode')
->label('Image')->defaultImageUrl(
function ($record) {
return $record->meta->image_url ?? "https://me.net/default.png";
})
this work for me
This is how I do it with Infolists
Sorry, I posted Infolists above. Here's how I do it with TableColumns:
`
Thx it's working!