Then set that property with the raw data of the image. You will want to store things like the length, content-type, width and height along with the raw data so that you can create the right headers to retrieve the image and display it in the browser or download it.
That should be enough to get you started on the right path, or decide not to bother.
This is pretty simple using the ODM setup with the @File type.
For a ORM entity, I would look at creating a column like so.
NOTE: Use this link to add the blob type to Doctrine2
How add BLOB type in Doctrine 2 using Symfony 2
Then set that property with the raw data of the image. You will want to store things like the length, content-type, width and height along with the raw data so that you can create the right headers to retrieve the image and display it in the browser or download it.
That should be enough to get you started on the right path, or decide not to bother.