🅭

WebP images won’t load in Micro­soft Edge with Application Guard

Update (): This article is about the old EdgeHTML-based version of Microsoft Edge and doesn’t apply to the newer Chromium-based version.

Microsoft Edge version 18, distributed as part of the Windows 10 October 2018 Update, has added support for the high-compression-efficiency WebP image format. Unfortunately, this release also introduces an issue causing images to not be displayed on many websites. This issue affects 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 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. However, all extensions are banned from running in Application Guard mode. The restriction is meant to provide tighter security (at the expense of features).

You can follow Microsoft Edge platform issue #19618851 for updates on this issue. Microsoft is okayish with providing feedback to the web developer community.

This issue also affects other multimedia platform extensions including AV1, HEVC, and the MPEG-2 legacy codec. There’s no workaround for it other than to disable application guard.

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.

Update (): Apple has finally added WebP support to Safari in version 14.