Developer forum

Forum » CMS - Standard features » Issues with WebP images

Issues with WebP images

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

We have a solution that went through a series of updates, now running on 9.15.15.

We have noticed an issue with inconsistent rendering of webp Images.

I have seen it in the front-end and I have tried it again in the back-end in the Image handler section.

I have selected the image and I get a correct preview of it.

Then, I have set up the parameters:

/Admin/Public/GetImage.ashx?Image=/Files/Images/pexels-lorraine-foreverblooms-834694.jpg&Format=webp&Width=1920&Height=1080&Quality=95&Crop=5

But I end up with an invalid output:

If I access the URL directly I get a 500 error.

Anybody else had any similar issues?

Thank you,

Adrian

 

 


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

It it helps, here is the StackTrace error:


    Stack trace:    at System.IO.PathHelper.GetFullPathName()
   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
   at Dynamicweb.Imaging.ImageHandling.ConvertCache.get_SourceFileChanged()
   at Dynamicweb.Imaging.ImageHandling.ConvertCache.get_CacheFileVirtualPath()
   at Dynamicweb.Admin.ProcessImageHandler.ProcessImage()
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

I do not think this is related to webp.

Are you missing some info from the stack trace? When you see the 500 response code in dev tools, take a look at the entire stack on the http response of the 500.

What happens if you use another format? Seems like an issue with locked newly uploaded images - maybe locked by AV?

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

The .png format works well. What we have also noticed that the 500 Error is temporary. The link may render 500 and then start working after half an hour or so.

I am not sure where to start investigating.

Thank you,
Adrian

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Where is this hosted? I think it is related to permissions or locking of temp files or similar and is a server setup issue.

Using webp goes through a another compression engine than PNG, and they might use different temp folders and read lock logic.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Your suggestion makes sense. We are handling the hosting for this solution.

We have not seen it before in any of our hosted solutions, and that's why hosting was not the first thing we had in mind.
Any way I can figure out the temp folder for the webp images?

Thank you,

Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Looking at your stack again, it is when reading the last changed date of Cache.net/Images folder of that image.

 

You must be logged in to post in the forum