What is the best way to intercept every request for an image on your site and ensure that a watermark is added to the image?
A. An HTTP module handling the AuthorizeRequest event
B. A custom HTTP handler set to handle .htm and .html pages
C. A custom HTTP handler configured to serve .png and .jpg files
D. An HTTP module handling the PostRequestHandlerExecute event
Answer:
C
Explanation
A. Incorrect: A module is not the best way to handle the request because it would have to deal with every HTTP request rather than just the image calls.
B. Incorrect: Serving .htm and .html pages will not create watermarks on image files.
C. Correct: Intercepting every request for .jpg and .png files is the easiest way to consistently add watermarks to the images.
D. Incorrect: A module is not the best way to handle the request because it would have to deal with every HTTP request rather than just the image calls.