You have to use generic handler.
Refer - Showing image in GridView from the database?
So, in DataBound event of Gridview you can write something like below.
Image1.ImageUrl = "~/ShowImage.ashx?id=" + id;
is the image control in the gridview and
is the Foreign Key value like "Employee ID" in
Table (you can get this while databinding).
The handler will return you the whole image and will be shown in that image control directly.
More reference :
1. Save and retrive Binarydata from database into image
2. how to display image from sql table in gridview?