You most definitely can save images in a database. You also need to save the mime type in another field.
then create a script that retrieves the data and puts the correct mime type in the header, ie
<?php
// file name: image.php
$id = (int)($_GET['id']);
if($id) {
// get data and type from database
// snip
header("Content-type: $type");
echo $data;
}
?>
then display it with <IMG SRC="image.php?id=$id">