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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -