Skip to main content
StorageFolder.GetThumbnailAsync(ThumbnailMode) | getThumbnailAsync(ThumbnailMode) method

Gets a thumbnail image for the current folder, sized for the specified purpose of the thumbnail.


storageFolder.getThumbnailAsync(mode).done( /* Your success and error handlers */ );

public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(
  ThumbnailMode mode

Public Function GetThumbnailAsync(
  mode As ThumbnailMode 
) As IAsyncOperation(Of StorageItemThumbnail)

IAsyncOperation<StorageItemThumbnail>^ GetThumbnailAsync(
  ThumbnailMode mode



Type: ThumbnailMode

A value from the enumeration that describes the purpose of the thumbnail and determines how the thumbnail image is adjusted.

For guidance about choosing the best thumbnail mode, see Guidelines and checklist for thumbnails.

Return value

Type: IAsyncOperation<StorageItemThumbnail>

When this method completes successfully, it returns a StorageItemThumbnail that represents the thumbnail image, or null if there is no thumbnail image associated with the folder.


For a sample that demonstrates the GetThumbnailAsync method, see File and folder thumbnail sample.

For guidance about choosing the best thumbnail mode, see Guidelines and checklist for thumbnails.

Note  The StorageFolder.GetThumbnailAsync method sometimes returns the default image of a folder. For Windows Phone Store apps, this method ignores the current theme when it returns this default image. The image returned is always the image for the dark theme; that is, the folder is transparent with a white border. If you want to return the image for the light theme, you have to create your own image that's visible on a light background. Then you have to use conditional logic to check the active theme. If the active theme is the light theme, use a method other than GetThumbnailAsync to retrieve your custom image.


The following example gets a thumbnail image for the user's Pictures folder and displays the thumbnail in an Image control. The example assumes that there's an Image control named ImageControl on the current page.

Before you run the following example, enable the Pictures Library capability in the app manifest file.

using Windows.Storage;
using Windows.Storage.FileProperties;
using System.Threading.Tasks;
using Windows.UI.Xaml.Media.Imaging; // For the Bitmap object.
            // Get the user's Pictures folder.
            // Enable the corresponding capability in the app manifest file.
            StorageFolder picturesFolder = KnownFolders.PicturesLibrary;

            // Get a thumbnail for the current folder.
            StorageItemThumbnail thumb =
                await picturesFolder.GetThumbnailAsync(ThumbnailMode.SingleItem);

            // Display the thumbnail in an Image control
            // named ImageControl on the current page.
            BitmapImage bitmapImage = new BitmapImage();
            ImageControl.Source = bitmapImage;

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


Windows::Storage [C++]



Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]


Windows::Storage [C++]



See also

GetThumbnailAsync(ThumbnailMode, UInt32)
GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)