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

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -