I would suggest that instead of inserting the image into the database, that you just upload it to your server and store the image name and root relative path in your database. Then you can dynamically get the image path and name from your database and the image will be uploaded to your server.