Display image stored in BLOB database in symfony

前端 未结 4 1048
温柔的废话
温柔的废话 2021-01-21 10:19

I load my image (blob data ) in my GETer Entity When I just return ($this->foto) in my GETer I see :Resource id #284 on the screen When I change my GETer like this : return stre

4条回答
  •  天命终不由人
    2021-01-21 10:52

    As it is said before you must use base64 method, but for a better performance and usability, the correct option is creating a custom twig filter (Twig extension) as described here .

    In your template:

    
    

提交回复
热议问题