We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We are on Sitecore 10.2 Docker Containers + JSS with NextJS + SXA and attempting to configure Dianoga 6.1.0
Scaled environment.
Dianoga.DisableForSites.config Dianoga.Jpeg.config Dianoga.Log.config Dianoga.NextGenFormats.CDN.config Dianoga.NextGenFormats.config Dianoga.Png.config Dianoga.Strategy.GetMediaStreamSync.config Dianoga.Svg.config z.01.Dianoga.NextGenFormats.WebP.config
It's working ok locally where we have CM container (XP0 topology).
But when deploying to Azure it's working ok on Preview/Experience Editor (CM container). But it's not working for CDs.
When accessing images with /-/media/ handler everything is ok. But for /-/jssmedia/ the images are not showed as image/webp content type.
We have replaced JSS media handler in web.config with custom one:
public class JSSWebPMediaHandler : MediaRequestHandler { protected override bool DoProcessRequest(HttpContext context, MediaRequest request, Sitecore.Resources.Media.Media media) { if (context?.Request.AcceptTypes != null && context.Request.AcceptTypes.Contains("image/webp")) { request.Options.CustomOptions["extension"] = "webp"; } return base.DoProcessRequest(context, request, media); } }
We have replaced sitecore_media handler. The transform web.config.xdt applied:
The Azure Rule engine "customAccept" was setup.
expected result : Images should convert to webp format Actual result : Images are coming in same png and jpg format
In standalone environment without CDN the images are converting to webp images but in scaled environment with Azure CDN images are not converting.
Is there anything we are missing?
@kamsar
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version of Dianoga
We are on Sitecore 10.2 Docker Containers + JSS with NextJS + SXA and attempting to configure Dianoga 6.1.0
Environment description
Scaled environment.
What configs you have enabled
Dianoga.DisableForSites.config
Dianoga.Jpeg.config
Dianoga.Log.config
Dianoga.NextGenFormats.CDN.config
Dianoga.NextGenFormats.config
Dianoga.Png.config
Dianoga.Strategy.GetMediaStreamSync.config
Dianoga.Svg.config
z.01.Dianoga.NextGenFormats.WebP.config
Reproducible steps (1... 2... 3...) that cause the issue
It's working ok locally where we have CM container (XP0 topology).
But when deploying to Azure it's working ok on Preview/Experience Editor (CM container). But it's not working for CDs.
When accessing images with /-/media/ handler everything is ok. But for /-/jssmedia/ the images are not showed as image/webp content type.
We have replaced JSS media handler in web.config with custom one:
public class JSSWebPMediaHandler : MediaRequestHandler
{
protected override bool DoProcessRequest(HttpContext context, MediaRequest request, Sitecore.Resources.Media.Media media)
{
if (context?.Request.AcceptTypes != null && context.Request.AcceptTypes.Contains("image/webp"))
{
request.Options.CustomOptions["extension"] = "webp";
}
return base.DoProcessRequest(context, request, media);
}
}
We have replaced sitecore_media handler. The transform web.config.xdt applied:
The Azure Rule engine "customAccept" was setup.
What you expected to see, versus what you actually saw
expected result : Images should convert to webp format
Actual result : Images are coming in same png and jpg format
In standalone environment without CDN the images are converting to webp images but in scaled environment with Azure CDN images are not converting.
Is there anything we are missing?
Relevant logs
@kamsar
The text was updated successfully, but these errors were encountered: