show avatar in rails admin panel

44 views
Skip to first unread message

Seth David

unread,
Jan 6, 2023, 10:09:59 AM1/6/23
to rails_admin
Hi guys , I have a model User, that has_one_attached :avatar,

In rails admin panel, the image shows up as a broken image link, 
How do get the image to show up in the rails admin panel , like the way profile pictures appear besides user accounts

Sankalp Dwivedi

unread,
Jan 7, 2023, 12:20:15 AM1/7/23
to rails_admin
Can you give you code snippet for better understanding of the issue.

Seth David

unread,
Jan 7, 2023, 4:38:46 AM1/7/23
to rails_admin
Screenshot (56).png

Seth David

unread,
Jan 7, 2023, 4:43:23 AM1/7/23
to rails_admin
when look at the dashboard, you see the avatar is no appearing like it should., however when you click on it, it opens the picture in another tab, meaning the picture is there, I just wnt to show it like the way a profile picture mostly appears 

On the right, in config/initializers/rails_admin.rb     
this is where you can modify the table that shows up in admin panel , like hide some attributes or fields, re-arrange how the appear etc.
on github rails_admin page, showing a thumnbail or image is mysteriously absent .....  My bad luck  https://github.com/railsadminteam/rails_admin/wiki/ActiveStorage#show-thumbnails-on-show-and-edit-views

Reply all
Reply to author
Forward
0 new messages