php - Retrieving images from DB in laravel 4.2 -
i have database filled data, when retrieve data image comes raw data. know have save them in public directory when upload but, there chance show these images since saved in database , want display them?
what format data in database?
if base64 can display this:
<img src="data:image/png;base64,{{ $user->image_data }}" alt="title" />
or if not base64 encoded yet:
<img src="data:image/png;base64,{{ base64_encode($user->image_data) }}" alt="title" />
note: browser not cache images rendered this.
Comments
Post a Comment