4

With a valid StorageFile (_storageFile) pointing to a jpeg image the following UWP method in C# returns a Thumbnail of the file with a minimum dimension of 512px.

StorageItemThumbnail thumbnail = await _storageFile.GetThumbnailAsync(ThumbnailMode.SingleItem, 512);

In previous version of Windows 10 this always returned an image. In Windows 10 Fall Creator's Update (16299), and only when the file is synced via OneDrive (even if stored on the computer), this frequently returns a placeholder icon instead. Once the thumbnail has been created after a few seconds, calling this method again returns the expected image. This bug is reproducible by clearing thumbnails in the OS in between attempts.

Can anyone reproduce this? Have you found a good workaround?

4
  • 1
    Same here. I've put the workaround code to get the small image by file.OpenAsync with specifying the small DecodePixelWidth/Height if the GetThumbnailAsync failed. Nov 7, 2017 at 1:36
  • Thanks for letting me know. What a huge bug from Microsoft. I checked ahead to build 17025 and it isn't fixed there either. Nov 7, 2017 at 3:16
  • Further useful information -- there seem to be lots of problems with Thumbnails in Fall Creator's Update -- a thread here. answers.microsoft.com/en-us/windows/forum/windows_10-files/… Nov 7, 2017 at 10:22
  • same, I don't see any resolution, so I have to open the full file, resize it on my own.... disappointed
    – sowen
    Mar 1, 2021 at 4:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.