Repository: microsoft/PowerToys
File: src/modules/launcher/Wox.Infrastructure/Image/ImageLoader.cs (C#)

Code before:
                 * Wox responsibility.
                 * - Solution: just load the icon
                 */
                type = ImageType.Folder;
                image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.IconOnly);
            }
            else if (File.Exists(path))
            {
                // Using InvariantCulture since this is internal
                var extension = Path.GetExtension(path).ToLower(CultureInfo.InvariantCulture);
                if (ImageExtensions.Contains(extension))
                {
                    type = ImageType.ImageFile;
                    if (loadFullImage)
                    {
                        image = LoadFullImage(path);
                    }
                    else
                    {
                        // PowerToys Run internal images are png, so we make this exception
                        if (extension == ".png" || generateThumbnailsFromFiles)
                        {
                            /* Although the documentation for GetImage on MSDN indicates that
                            * if a thumbnail is available it will return one, this has proved to not
                            * be the case in many situations while testing.
                            * - Solution: explicitly pass the ThumbnailOnly flag
                            */
                            image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.ThumbnailOnly);
                        }
                        else
                        {
                            image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.IconOnly);
                        }
                    }
                }
                else
                {
                    type = ImageType.File;
                    image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.RESIZETOFIT);
                }
            }
            else
            {
                image = ImageCache[ErrorIconPath];
                path = ErrorIconPath;
            }

            if (type != ImageType.Error)
            {
                image.Freeze();
            }

Review comment (bug):
I don't think we should remove it. On my test system Adobe's provider shows always black (and broken) images in explorer.

We should keep it and maybe hide it behind a setting to enable it if Adobe thumbnails makes trouble.

Code after:
                 * Wox responsibility.
                 * - Solution: just load the icon
                 */
                type = ImageType.Folder;
                image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.IconOnly);
            }
            else if (File.Exists(path))
            {
                // Using InvariantCulture since this is internal
                var extension = Path.GetExtension(path).ToLower(CultureInfo.InvariantCulture);
                if (ImageExtensions.Contains(extension))
                {
                    type = ImageType.ImageFile;
                    if (loadFullImage)
                    {
                        image = LoadFullImage(path);
                    }
                    else
                    {
                        // PowerToys Run internal images are png, so we make this exception
                        if (extension == ".png" || generateThumbnailsFromFiles)
                        {
                            /* Although the documentation for GetImage on MSDN indicates that
                            * if a thumbnail is available it will return one, this has proved to not
                            * be the case in many situations while testing.
                            * - Solution: explicitly pass the ThumbnailOnly flag
                            */
                            image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.ThumbnailOnly);
                        }
                        else
                        {
                            image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.IconOnly);
                        }
                    }
                }
                else if (!generateThumbnailsFromFiles || (extension == ".pdf" && WindowsThumbnailProvider.DoesPdfUseAcrobatAsProvider()))
                {
                    // The PDF thumbnail provider from Adobe Reader and Acrobat Pro lets crash PT Run with an Dispatcher exception. (https://github.com/microsoft/PowerToys/issues/18166)
                    // To not run into the crash, we only request the icon of PDF files if the PDF thumbnail handler is set to Adobe Reader/Acrobat Pro.
                    // Also don't get thumbnail if the GenerateThumbnailsFromFiles option is off.
                    type = ImageType.File;
                    image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.IconOnly);
                }
                else
                {
                    type = ImageType.File;
                    image = WindowsThumbnailProvider.GetThumbnail(path, Constant.ThumbnailSize, Constant.ThumbnailSize, ThumbnailOptions.RESIZETOFIT);
                }
            }
            else
            {