Slimsy
Slimsy copied to clipboard
I cannot get Slimsy and AzureBlobStorage
I cannot get Slimsy and AzureBlobStorage to work together.
Followed these instructions to configure - https://our.umbraco.com/documentation/Extending/FileSystemProviders/Azure-Blob-Storage/
Media is uploaded correctly but when rendered the original image is always returned regardless of the crop/quality/format parameters we use.
What we expect is an image returned matching the parameters requested.
For example: https://xxxx.azureedge.net/media/bdxppozj/steve-halama-grw8xnnx4qm.jpg?rxy=0.7722735494210942,0.6297253454943595&width=30&height=20&quality=40&v=1db294eca131e00 Should return a 30x20 jpeg with quality 40.
What actually gets returned is the original image.
CDN settings in Azure: 'Query string caching behaviour' option has been set to "Cache every unique URL'"
appsettings.json
"Umbraco": { "Storage": { "AzureBlob": { "Media": { "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=;AccountKey=;EndpointSuffix=core.windows.net;", "ContainerName": "media-prod", "MediaPath": "", "UsePrivateContainer": false, "AutoCreateContainer": false } }, "Cdn": { "Url": "https://cdn.azureedge.net/", "RemoveMediaFromPath": false } }, "CMS": { "Global": { "Id": "8eb1f6ce-0ec6-4628-879f-7f644016da76", "SanitizeTinyMce": true }, "Content": { "AllowEditInvariantFromNonDefault": true, "ContentVersionCleanupPolicy": { "EnableCleanup": true } } } }, "Slimsy": { "WidthStep": 180, "UseCropAsSrc": true, "DefaultQuality": 70, "Format": "", "BackgroundColor": "white", "AppendSourceDimensions": true, "EncodeCommas": true, "AutoOrient": true },
Startup.cs
` public void ConfigureServices(IServiceCollection services)
{
services.AddUmbraco(_env, _config)
.AddBackOffice()
.AddWebsite()
.AddComposers()
.AddAzureBlobMediaFileSystem()
.AddAzureBlobImageSharpCache("cache")
.AddCdnMediaUrlProvider()
.AddSlimsy()
.Build();
}
/// <summary>
/// Configures the application.
/// </summary>
/// <param name="app">The application builder.</param>
/// <param name="env">The web hosting environment.</param>
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseImageSharp();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
}`
_ViewImports.cshtml
@using Umbraco.Extensions @using Umbraco.Cms.Web.Common.PublishedModels @using Umbraco.Cms.Web.Common.Views @using Umbraco.Cms.Core.Models.PublishedContent @using Microsoft.AspNetCore.Html @using Slimsy.Enums @using Our.Umbraco.GMaps @addTagHelper *, Slimsy @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, Smidge @addTagHelper *, OurHtagEditor @inject Smidge.SmidgeHelper SmidgeHelper @inject Slimsy.Services.SlimsyService SlimsyService @using Slimsy.Extensions
Umbraco 13.5.1 Slimsy version 5.1.2 Umbraco.StorageProviders 13.1.0 Umbraco.StorageProviders.AzureBlob 13.1.0 Umbraco.StorageProviders.ImageSharp 13.1.0
Thanks!