尝试从PHPmyadmin显示图像

I am trying to display an image from my database but it isn't showing on the website. How do i get the image to display through php?

Database set up

Database Setup

Php code

print "    <td><img src='Img.php?id=" . $row["id"] . "' /></td>";

1st guess, the img column contains a link in which case it will be

echo " <td><img src='" . $row["img"] . "' /></td>";

2nd guess, the img column is base64 encoded image in which case it will be

echo " <td><img src='data:image/gif;base64," . $row["img"] . "' /></td>";

I think, that is off the top of my head.(if image is gif, amend accordingly)

3rd guess, some wizardry going on? perhaps img.php is doing the base64 decode for you?

I would recommend storing the image on disk or S3 or something then storing the path in the DB.