Abstract

Image Guard is the first (if not unique, at least for the moment) BlogEngine.NET extension that allows you guard your image files in blog posts in three different ways when they are displayed on other sites.

  1. Watermark: Add watermark to your images. (That’s a good way to spread your web site, isn’t it ? : ) );
  2. Block: Replace the image that other sites request with a block image, such as an image only shows Not Allowed text on it;
    • images
  3. Reject: Responde the request with 403 code.

Requirements

BlogEngine.NET 2.0 or above

Installation

Download the compressed file ImageGuard.zip (6.18 kb) (version 1.0), then:

  1. Extract files;
  2. Copy ImageGuard.cs into ~/App_Code/Extensions/ folder.

Configuration

  • Guarding Type: You can choose one of the three different ways mentioned above that to protect your images, default is Watermark.
  • Watermark Text: If you choose the Watermark Guarding Type, then the watermark text you input to this textbox will be displayed in the right bottom of the images that requested by other site, otherwise this value will be ignored. Recommend you input your web site url in this field, for example: www.zizhujy.com.
  • Virtual Path Of Watermark Image: If you choose the Watermark Guarding Type, then the image file in this path you inputted will be displayed in the left bottom of the images that requested by other site, otherwise this value will be ignored. You should input virtual path against your BlogEngine.NET application, for example, you use an image file in your blog post, then the virtual path of watermark image value would be like “~/App_Data/files/yourWatermark.png”.
  • Virtual Path Of Block Image: If you choose the Block Guarding Type, then the value you inputted into this text box will be used as the file path for the block image, otherwise this value will be ignored. You should input virtual path against your BlogEngine.NET application, for example, you use an image file in your blog post, then the virtual path of watermark image value would be like “~/App_Data/files/yourWatermark.png”.

P.S.

I’m sorry for my poor English. Welcome your suggestion!

ImageGuard.zip (6.18 kb)