Back office images low res when using slimsy-pictu...
# help-with-other
c
Umb V13.6.0, Slimsy V5.1.2 Using an Image block in a BlockGrid, I'm finding the images displayed in the back office appear to be low res while they look fine on the site itself. The relevant image block code is this:-
Copy code
if (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.
m
Does the back office load the JS slimys needs? As your have lqip set to true
c
Well the partial does have
@using Slimsy
&
@using Slimsy.Extensions
. In the end I decided to detect preview mode with:-
Copy code
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.
2 Views