Getimage method
public string
GetImage(object data, string field, int width)
{
if (data is Item)
{
Item item = (Item)data;
if (item.Fields[field] != null)
{
if (item[field] != "")
{
Sitecore.Data.Fields.ImageField img = item.Fields[field];
return "<a href=\"" + GetPath(data) + "?mw=" + width +
"\"><img src=\"" + img.Src + "?mw=" + width.ToString() +
"\"/></a>";
}
}
}
return "";
}