Hi Everyone,
I'm trying to take to take Vincent Baaij's ImageProcessor.Web.Episerver for a test drive, but I'm failing hard trying to get it to work. I've been trying for a couple of days now and I'm not sure what else to try.
The goal is to actually use the Azure version as we're running in DXC, but i've tried this and the local version in our codebase to no avail.
I had done little more than install the package and build to get:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Not sure where to start or what info to provide here so I'll start with the exception being thrown:
Exception thrown: 'System.NullReferenceException' in ImageProcessor.Web.Episerver.Azure.dll
The stacktrace shows the following:
at ImageProcessor.Web.Episerver.Azure.AzureBlobCache..ctor(String requestPath, String fullPath, String querystring)
These are the packages I have installed:
<package id="ImageProcessor" version="2.6.2.25" targetFramework="net461" />
<package id="ImageProcessor.Plugins.WebP" version="1.1.0" targetFramework="net461" />
<package id="ImageProcessor.Web" version="4.9.3.25" targetFramework="net461" />
<package id="ImageProcessor.Web.Config" version="2.4.1.19" targetFramework="net461" />
<package id="ImageProcessor.Web.Episerver" version="5.0.0.40599" targetFramework="net461" />
<package id="ImageProcessor.Web.Episerver.Azure" version="5.1.0.38549" targetFramework="net461" />
The web.config seems to have the all the entries it needs (pointers to the config files, imageprocessormodule etc).
I can successfully use something like:
PictureUtils.GetPictureData(Url.ContentUrl(Model.Image), ImageTypes.HeroImage, true);
to return a url like:
http://localhost:49945/siteassets/images/hero-banners/advanced_hero_reimagine_your_business_no_text_v001.jpg?width=1280&mode=crop&heightratio=0.5625&quality=80
but any image I attempt to GET that has the query string appended to it results in a 500 error. Remove the ?... and the image is retrieved correctly.
Any thoughts as to where to start?
Alex