The examples on this site are currently tested to work on Phalcon V3.4 and Phalcon Devtools V3.2 Some issues may arise when using later versions.

Please get in touch or post a comment below the post if you encounter a problem.

Once the image has been uploaded to the database pulling that information and displaying it on the screen is simply a matter of understanding base64 encoded data. Base64 encoding data is a way of converting binary data into text data which makes it easier to process in html.

This example will present an icon-sized image beside each member's details in a table on the member/search page. The bootstrap img-responsive class controls the size of the image and center-block ensures it appears centered. The size of the image displayed displayed can be easily adjusted using the height and width attributes. Add the following <td></td> element underneath the other <td></td> elements in app/views/member/search.phtml

<td><img class="img-responsive center-block" 
		height="200" width="100" 
		src="data:image/jpeg;base64,<?php echo $member->getMemberpic() ?>">
</td>

This will add an additional column on the member/search results page displaying a small icon-sized image for each member as below. The code in red above instructs html to load the image from the inline base64 encoded data as opposed to loading the data from a file. Th code in blue pulls the data in from the $member object. The member/search page will now look something like this: