php - how to display an image from a mysql blob field in symfony? -
how display image mysql blob field in symfony? it's echo text 'array'.
is possible add new property indexsuccess.php like
<img src="<?php echo $persons->getphoto('[property]') ?>" />
or
<img src="<?php echo $persons->getphoto()->[property] ?>" />
to print correctly?
the src
attribute contains location, not image data - exception of data uris.
you need create page sets correct headers , outputs image data db, , point in src.
the alternative echo data uri in src
attribute.
also keep in mind if have output escaping on, symfony escapes data in blob field while being passed view layer.
Comments
Post a Comment