WebP images won’t load in Microsoft Edge with Application Guard

Microsoft Edge version 18, distributed as part of the Windows 10 October 2018 Update, have added support for the the high-compression-efficiency WebP image format. Unfortunately, this release also introduces an issue causing images to fail to display completely on many websites for users of Windows Defender Application Guard.

Support for WebP was implemented as a platform format extension your device gets from the Microsoft Store the same way the Theora and Vorbis media codecs were added earlier this year. The extensions are pushed automatically to Windows 10 users, but this is still significant because it means the Windows platform doesn’t support these formats natively.

Application Guard is a virtualization-backed sandboxing platform that limits the potential fallout from a security incident in Microsoft Edge. When running in Application Guard mode, Microsoft Edge has limited access to the host operating system. Browser extensions and platform extensions are also unavailable when running Edge in Application Guard mode.

For web audio and video, you can specify multiple media codecs to ensure the best browser support. The following example will play the OGG Theora video source in Microsoft Edge and the MPEG-4 video source, which is natively supported by Windows 10, in Microsoft Edge with Application Guard.

<video>
  <source src="video.ogv" type="video/ogg" />
  <source src="video.mp4" type="video/mp4" />
</video>

Things should have worked the same way for web responsive images. However, Microsoft Edge always prefers to source WebP images even when the extension is unavailable. to make things worse, it also doesn’t display the fallback image when it fails to render the source image it selected.

<picture>
  <source src="image.webp" type="image/webp" />
  <source src="image.jpeg" type="image/jpeg" />
  <img src="image-fallback.jpeg" />
</picture>

When presented with a fallback image and a image format it can display, Microsoft Edge in Application Guard mode still shows a preference for WebP even though it can’t display it.

This issue affects a lot of prominent websites who’ve opted to take advantage of the higher compression gains they get with a modern image format like WebP. You can also see it here on Ctrl blog where most images will just not work in Microsoft Edge.

There isn’t really anything web developers can do to work around this issue other than strip out unsupported photo formats when encountering the Microsoft Edge User-Agent. The images won’t fire an error even when it fails to display, and you can’t detect that Microsoft Edge is running in Application Guard mode from the web platform.

Normally, I’d suggest using a browser extension that could hotfix the problem but these are also banned from running inside Application Guard mode.

Web developers can follow Microsoft Edge platform issue #19618851 for updates on this issue.

This issue also affects other multimedia platform extensions including AV1, HEIF, HEIF+HEVC, and the MPEG-2 legacy codec.

Now that Mozilla Firefox and Microsoft Edge have added support for WebP, the last holdout for broader adoption of WebP is Apple Safari. I hope we’ll see this issue in Microsoft edge resolved very quickly. I’m perfectly fine with WebP being unsupported in their extra secure enterprise-grade web browsing environment, although Microsoft have got to fix the source selection to not prefer an unsupported file format in that environment.