Blob image does not appear

0

I need to make my images appear in tag img but only a few appear, I have already taken all css and no problem in that.

Below the photo that testifies that the html is understanding the image:

OnmypageI'mcallingtheimageslikethis:

@foreach($produto->imagensas$imagen)@if($imagen->FlgPrincipal==0)<divclass="col-md-3">
          <img src="{{$imagen->BLOB}}" class="img-responsive img-normal">
       </div>
    @elseif($imagen->FlgPrincipal == 1)
       <div class="col-md-5">
          <img src="{{$imagen->BLOB}}" class="img-responsive img-principal">
       </div>
    @endif
@endforeach

What could be going on? I'm basically using framework Laravel

    
asked by anonymous 24.09.2016 / 21:15

1 answer

-1

Well, first of all, to insert a blob file into the table, you need to use the native function of php file_get_contents() .

Exemplifying:

"INSERT INTO tabela(imagem) VALUES ( file_get_contents($imagem) )";

And to display:

echo '';

Or:

header("Content-Type: image/jpg");
echo base64_encode($row['imagem']);
    
24.12.2018 / 16:19