I’m using Laravel 9 and I wanted to show an image which is stored at storage/app/avatars.
So I tried this at the Blade:
{{ AppHttpHelperClassesImageHelper::admAvatar() }}
And this is the ImageHelper Class:
namespace AppHttpHelperClasses;
use IlluminateSupportFacadesResponse;
use IlluminateSupportFacadesStorage;
class ImageHelper
{
public static function admAvatar()
{
$content = Storage::get('avatars/profile.png');
return Response::make($content)->header('content-type','image/jpeg');
}
}
So I tried making an image from the profile.png and return it after all.
But the problem is it does not show anything!
And when I dd(Response::make($content)->header('content-type','image/jpeg')), I get this:
And the result of dd($content) also goes like this:
So how can I convert this properly into an image?

