Hello
Try to use a TEXT column for the flags in the table.
You musto to encode the image has base64 and then to retrive the image to the web you must to decode de content of the field.
It is a simple a easy way to store and retrive images from databases
For example
For HTML
<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAIAAAABlV4SAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAABJFSURBVHja1F . ." />
For PHP
echo '<img src=""> . base64_decode($data) . '" />';