Try our conversational search powered by Generative AI!

ImageResizer and preview page

Vote:
 

In one of my projects I have created a preview page for images, so an editor can preview the different sizes of the image defined by the ImageDescriptor attribute.
This works perfectly fine

[TemplateDescriptor(TemplateTypeCategory = TemplateTypeCategories.MvcController,
    Tags = new[] { RenderingTags.Edit },
    AvailableWithoutTag = false)]
public class ImagePreviewController : ContentController
{
    private readonly IContentLoader _contentLoader;

    public ImagePreviewController(IContentLoader contentLoader)
    {
        _contentLoader = contentLoader;
    }

    public ActionResult Index(ImageFile currentContent)
    {
        var startPage = _contentLoader.Get(SiteDefinition.Current.StartPage);
        var model = new ImagePreviewModel(startPage, currentContent);
        return View(model);
    }
}

However, after installing ImageResizer the preview page is no longer triggered. When you edit an image now the UI simply displays the image (like it does out of the box when you don't have a preview page). 

Is there any way I can display my image preview page again and still use ImageResizer

The idea behind this is that in the end I don't want to use the ImageDescriptor attribute any more for resizing images, but I want ImageResizer to do this. But I still want to have my image preview page.

Any help would be really appreciated.

/Mark

#145792
Mar 11, 2016 16:17
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.