November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
You should be able to configure this in StartUp.cs, like the DXP-example shows here:
https://github.com/vnbaaij/Baaijte.Optimizely.ImageSharp.Web#configuration-for-use-with-dxp
Basically you specify connection yourself based on what you have configured in appSettings.json.
From appSettings.json:
"ConnectionStrings": {
"EPiServerDB": "",
"EcfSqlConnection": "",
"EPiServerAzureBlobs": "",
"EPiServerAzureEvents": ""
}
In StartUp.cs
var blobConnection = _configuration.GetConnectionString("EPiServerAzureBlobs");
imageSharpBuilder.Configure<AzureBlobStorageCacheOptions>(options =>
{
options.ConnectionString = blobConnection;
options.ContainerName = "resizer-cache";
});
imageSharpBuilder.SetCache<AzureBlobStorageCache>();
Thanks! The connection string worked perfectly, but I wasn't able to use 'resizer-cache' as it wasn't a valid container in my DXP environment? Using the default blob storage container name `mysitemedia` worked perfectly though. Thank you!
I have a recently deployed DXP site using Baaijte.Optimizely.ImageSharp.Web where I've setup the AzureBlobStorageCacheOptions as described, however I'm getting 404 errors on the images from the ImageSharp plugin.
I've also added AzureBlobStorageImageProviderOptions as noted in this SO post, but I still get 404 errors: https://stackoverflow.com/questions/69081515/imagesharp-web-with-azureblobstorageimageprovider-giving-404s
The connection strings are now stored using Microsoft KeyVault, is it possible to configure the blob storage when the connection string is in this format?
@Cheryl did you migrate an existing site? Do you also get a 404 when uploading a new image? I've had a similar issue with 404's caused by storing the images in a different container than the default "mysitemedia". What worked for me was to configure the azure blob provider options in startup like so:
//put this after 'AddCmsCloudPlatformSupport'
services.Configure<AzureBlobProviderOptions>(o =>
{
o.ContainerName = "mycontainer";
});
Note that most likely you cannot override the connection string this way.
Hi @Ynze - This is a brand new site currently in development. We're having the issue with existing images that were added before the plugin was configured, and also newly uploaded images.
I am assuming the images are going to the default "mysitemedia" so I haven't explicitly set that in the configuration, but I can try to add that as a test.
Hello, we're working with the Optimizely.ImageSharp.Web Library on CMS 12, and it requires Azure Blob Storage connection information for DXP sites. Previously for the Windows based (CMS 11) clients the keys to pull from the Web.config were 'EPiServerAzureBlobs', and there was no blob container needed. Does anyone know what the keys are for configuration in CMS 12 without a Web.config?
Github Bug Report
Thanks!