Centralized image server with security and water mark on it

735 views Asked by At

I have a situation where I have to make a centralized image website. I want to secure those images from direct access. I want to send response with a watermark over it depending on request parameter. What is the best approach for it.

So far I have created a content website and directly accessing image. Should I create handler from response. But if I use handler will it be slow (response).

Kindly suggest me the best approach.

2

There are 2 answers

4
ilivewithian On

An image handler is the way to go, you will be able to check the http header referer and only serve image when appropriate.

There is an article on the code project that has all the parts you need:

http://www.codeproject.com/Articles/126421/Image-Handling-In-ASP-NET

You'll have to ignore certain sections and expand on others, but there is basically everything you need in the article.

0
NaveenBhat On

This might help you: http://www.naveenbhat.in/2012/06/directory-security-on-webservice-with.html

Here, I created the handler for html and pdf types. You can implement the logic in same way for image.