This project is read-only.

Image resizer HTML Helper

You can use ResizedImage helper to include resized image into your views.
This helper allows to avoid requests to file handler and any redirects: it just puts link to file in file folder.

Helper call:
@Html.ResizedImage(image.FilePath, width:250, height:190, htmlAttributes: new {alt = "Lolcats"}) 

<img alt="Lolcats" style="width:250px;height:190px;" src="/Media/Amba.ImageCache/Default/img/lolcats/fatcat-6DEBDBE03B0671AC98D6E771A48503E5.jpg">

Also you can use helper to get resized image url:
@ResizedImageUrl(image.FilePath, width:250, height:190)


Last edited Oct 8, 2012 at 8:47 PM by musukvl, version 4


No comments yet.