Search code examples
imageresizer

ImageResizer: Resize based on filename


Instead of specifying width and height in the querystring like this:

http://example.com/media/cow/small.png?w=100&h=100

Is it possible to configure Imageresizer to look at the filename (small.png) and use this information to scale it to 100x100?

This would allow me to request images like this:

http://example.com/media/cow/small.png
http://example.com/media/cow/big.png

Solution

  • This is usually called URL rewriting. See

    We also define a Config.Pipeline.Defaults event to let people change default settings. It's just like URL rewriting, but provides 'default' behavior and only affects processed images.