Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

johansmits's avatar

Avatar / Image custom

I would like to use the avatar or image field but load the images from a private location.

As I only want to allow the avatar/image to be accessible from logged in users. I can save the avatar or image to a local disk instead of the default public one, but then the preview in Nova won't work.

What would be the best way to get this?

0 likes
2 replies
MohamedTammam's avatar

Store it in a private directory and create a link to access this to only authorized users. And use download method to send the image from that link

Storage::download($yourImagePath);
johansmits's avatar

But how can I use this behaviour in laravel nova. I'd love to see the Avatar default functionality of laravel nova.

Please or to participate in this conversation.