are you also doing this? (tho it might be a different funciton in mssql)
How many images are you planning to store here and show in a table. How often will the user change said image?
As it might be easier to store them in a file instead of a db. Which will also up the performace of the image loading