microsoft / microsoft/PowerToys
[File Explorer add-ons] Add WebView2-based preview handler for .mhtml/.mht files to replace legacy IE component
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 139k
- Forks
- 8.6k
- PR merge metrics
- PR metrics pending
Description
Description of the new feature / enhancement
When a user selects a .mhtml or .mht file in File Explorer and enables the preview pane, Windows currently uses an old Internet Explorer-based component (via inetcomm.dll) to render the content. This legacy engine lacks support for modern web standards—most notably, it cannot display WebP images embedded in the MHTML file. As WebP becomes increasingly common on the web, many archived pages saved as MHTML now contain these images, resulting in blank or broken previews.
Users who rely on File Explorer previews for quick inspection of saved web pages (e.g., researchers, content curators, or everyday users) would benefit greatly from a modern, WebView2-based preview handler that properly renders all contemporary image formats and web features.
Scenario when this would be used?
Current limitation: The existing preview handler for .mhtml/.mht files is tied to the legacy MSHTML engine (Internet Explorer) and does not support WebP, SVG-in-OpenType, CSS variables, or other modern web technologies. This leads to incomplete or incorrect previews for many archived pages.
WebView2 advantage: Microsoft Edge WebView2 is based on Chromium and supports all modern web standards, including WebP, modern JavaScript, and CSS. A WebView2-based preview handler would render MHTML files exactly as they appear in Edge/Chrome, ensuring accurate previews.
Supporting information
Provide an option in PowerToys settings to “Enable modern MHTML preview (WebView2)”.
When enabled, PowerToys could register a new preview handler (via shell extension) that uses WebView2 to render the MHTML content, temporarily overriding the system default (or offering it as an alternative in the “Open with” menu for preview).
Ensure the handler correctly interprets the multipart MIME structure of MHTML files and resolves embedded resources via Content-Location or Content-ID.
User impact: This feature would modernize a long-overlooked part of Windows, making archived web content instantly viewable without opening a full browser, and eliminate the frustration of broken previews due to outdated image formats.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Start by locating the existing .mhtml/.mht preview handler and the PowerToys settings architecture, then assess how a WebView2 shell extension would fit. Done should include the setting, handler registration, modern rendering, and correct resolution of embedded resources.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop, operating-systems, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100