doc/devdocs/modules/imageresizer.md
Public overview - Microsoft Learn
Image Resizer is a Windows shell extension that enables batch resizing of images directly from File Explorer.
Image Resizer provides a convenient way to resize images without opening a dedicated image editing application. It is accessible through the Windows context menu and allows users to:
Image Resizer consists of multiple components:
Image Resizer integrates with the Windows context menu following the PowerToys Context Menu Handlers pattern. It uses a dual registration approach to ensure compatibility with both Windows 10 and Windows 11.
The context menu integration follows the same pattern as PowerRename, using:
For more details on the implementation approach, see the Dual Registration section in the context menu documentation.
Image Resizer dynamically determines when to show the context menu option:
AppxManifest.xml registers the extension for all file types (Type="*")AssocGetPerceivedType()ECS_ENABLED); otherwise, it remains hidden (returns ECS_HIDDEN)This approach provides flexibility to support additional file types by modifying only the detection logic without changing the system-level registration.
Image Resizer uses WPF for its user interface, as evidenced by the App.xaml.cs file. The UI allows users to:
From the App.xaml.cs file, we can see that the application:
LanguageHelper.LoadLanguage()ResizeBatch.FromCommandLine()MainViewModelGPOWrapper.GetConfiguredImageResizerEnabledValue()See the Debugging Context Menu Handlers section for general guidance on debugging PowerToys context menu extensions.
For Image Resizer specifically, there are several approaches:
register.reg) with the following content:Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{51B4D7E5-7568-4234-B4BB-47FB3C016A69}]
@="PowerToys Image Resizer Extension"
[HKEY_CLASSES_ROOT\CLSID\{51B4D7E5-7568-4234-B4BB-47FB3C016A69}\InprocServer32]
@="D:\\PowerToys\\x64\\Debug\\PowerToys.ImageResizerExt.dll"
"ThreadingModel"="Apartment"
[HKEY_CURRENT_USER\Software\Classes\SystemFileAssociations\.png\ShellEx\ContextMenuHandlers\ImageResizer]
@="{51B4D7E5-7568-4234-B4BB-47FB3C016A69}"
reg import register.reg
taskkill /f /im explorer.exe && start explorer.exe
Attach the debugger to explorer.exe
Add breakpoints to relevant code in the Image Resizer shell extension
regsvr32 "D:\PowerToys\x64\Debug\PowerToys.ImageResizerExt.dll"
Context menu not appearing:
For Windows 11, check AppX package registration:
get-appxpackage -Name *imageresizer* to verify installationRemove-AppxPackage to remove problematic registrationsMissing UI or processing failures: