Craig100
02/16/2025, 9:04 PMif (Model.Content.Image is MediaWithCrops theImage) {
<slimsy-picture media-item="@theImage" css-class="lazyload img-fluid" crop-alias="@crop" render-lqip="true" alt-text="@(string.IsNullOrEmpty(imageAltTag) ? "Image Description Missing" : imageAltTag)" size="auto"></slimsy-picture>
}
I'm also using the Umbraco.Community.BlockPreview V1.12.2 package and the Badgernet.Umbraco.WebPicAuto V1.1.5 package for image upload resizing.
Any clues would be appreciated.
Thanks.Matt Wise
02/17/2025, 7:59 AMCraig100
02/22/2025, 12:47 PM@using Slimsy
& @using Slimsy.Extensions
. In the end I decided to detect preview mode with:-
var isBackoffice = false;
if (UmbracoContextAccessor.TryGetUmbracoContext(out var umbracoContext)) {
isBackoffice = umbracoContext.InPreviewMode; // True in the backoffice preview
}
and switch out Slimsy for the back office. Seems to work. Though I don't recall having to do that before in other projects.