TIP for NivoSlider

4 years ago
Hi,

I write a small tips for nivoslider and resize image server side.

- install via NUGET the ImageProcessor packages

ImageProcessor
ImageProcessor.Web
ImageProcessor.Web.PostProcessor
ImageProcessor.Web.Config

- mod the file PublicInfo View file under NivoSlider Plugins:

if (!string.IsNullOrEmpty(link))
        {
            <a href="@link">
                <img src="@pictureUrl?width=1200&height=350&mode=crop&center=0.25,0.30" data-thumb="@pictureUrl" data-transition="@dataTransition" alt="" title="@text" />
            </a>
        }
        else
        {
            <img src="@pictureUrl?width=1200&height=350&mode=crop&center=0.25,0.30" data-thumb="@pictureUrl" data-transition="@dataTransition" alt="" title="@text" />
        }

Bye
4 years ago
looks nice but hard to know if the cropped images are properly scaled. It's just 50/50 chance of missing out the main part of the image. Guess we need to have Image Crop feature.
4 years ago
Yes, if the image is smaller. You can change the crop image center. Better if this setup can be made in backoffice.