Markdown preview: Show images from local and network sources
Explanation
This policy configures whether images from local and network (UNC) sources should be displayed in Markdown file previews.
If you enable this setting, images from the document's folder and network shares will always be shown and the user won't be able to disable it.
If you disable this setting, all images will be blocked and the user won't be able to enable local image rendering.
If you don't configure this setting, users are able to enable or disable showing local images.
Note: Online/remote images (http/https URLs) are always blocked regardless of this setting. Images are rendered inside a sandboxed WebView2 control with scripts disabled. The Mark-of-the-Web (Zone Identifier) is not checked; access is controlled by path validation against the document's directory (local) or share root (UNC).
Registry
HKEY_LOCAL_MACHINE\Software\Policies\PowerToysHKEY_CURRENT_USER\Software\Policies\PowerToys- Value name
MarkdownAllowLocalImages
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Computer (HKLM)
Enable
# Enable: PowerToys/MarkdownAllowLocalImages
$k = 'HKLM:\Software\Policies\PowerToys'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'MarkdownAllowLocalImages' -Value 1 -Type DWordDisable
# Disable: PowerToys/MarkdownAllowLocalImages
$k = 'HKLM:\Software\Policies\PowerToys'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'MarkdownAllowLocalImages' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": PowerToys/MarkdownAllowLocalImages
$k = 'HKLM:\Software\Policies\PowerToys'
Remove-ItemProperty -Path $k -Name 'MarkdownAllowLocalImages' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"
Application
Microsoft PowerToys (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.