I am testing out parts of the ImageResizing library, specifically resizing, diskcache and watermarking.
I believe I have everything installed correctly and URL links like:
<img src="/images/tests/mytest.png?w=300&watermark=style1" />
render well in the browser, and also cache to disk with a random/hashed filename. However, I can't figure out how to serve up static images with the watermark on them. I was hoping that the diskcache would be able to serve up the cached image based on its filename alone, but looking at it, I imagine it needs the querystring along with it (indeed it renders fine served statically with the querystring).
my <resizer>
section of web.config reads:
<resizer>
<pipeline fakeExtensions=".ashx" />
<plugins>
<add name="DiskCache" />
<add name="AdvancedFilters" />
<add name="Watermark" />
<add name="SimpleFilters" />
</plugins>
<diskCache dir="~/imagecache" />
<watermarks>
<otherimages path="~/site/watermarks" />
<image name="style" path="~/site/watermarks/wmtest.png" imageQuery="filter=alpha(0.65)" Top="175" Left="32" />
</watermarks>
</resizer>
On the surface, I like the way ImageDraw (another very capable library) handles caching as you are able to name the cachefile and the cached file gets served up even when requested in a static fashion. The downside is that ImageDraw can be much heavier to program for in the codebehind.
My primary goal is to have certain images watermarked with copyright info which can't be circumvented by modifying a querystring. The secondary goals are to provide fast efficient resizing and caching especially on thumbnails. ImageResizing seems very well suited for my secondary goals, but it looks like caching only works with the querystring option (documented), unless I've missed another way ... hence my main question.
Also, if it's not clear, I am testing both libraries (ImageResizing and ImageDraw) to see which one weighs in better for our needs. Right now I'm working locally on Cassini, but the deployment will be to an IIS7 server with the app running under ASP.NET 4.0.