Have you ever noticed that the gallery on Android opens almost instantly, even if there are thousands of photos in it? Or wondered why, after deleting photos from your phone, their smaller copies are still displayed in some applications? It's all about thumbnail cache a hidden system that speeds up the device, but can take up gigabytes of memory. In this article we will analyze in detail where exactly Android stores thumbnails for photos, videos, documents and even APK files, how they are generated, and what will happen if they are deleted.

Thumbnails (or thumbnails) are smaller versions of images that the system automatically creates for quick preview. They are stored in separate folders that are not accessible through the standard file manager, and are updated whenever the media files are changed. But here lies the problem: over time, this cache grows, taking up space on the internal drive, and sometimes causing errors in the gallery. This is especially true for users with budget smartphones with 32โ€“64 GB memory, where every megabyte counts.

Unlike iOS, where managing the thumbnail cache is as automated as possible, Android provides more freedom - and responsibility. You can manually clear these files, transfer them to an SD card (on some firmwares), or even disable their generation altogether. But before you do anything, you need to understand how the thumbnails storage system works in your version of Android and what the consequences of intervention are.

1. Main folders with thumbnails in Android: where to look

In most versions of Android (from Android 5.0 Lollipop to Android 14) thumbnails are stored in hidden system folders, the path to which depends on the file type. Here are the key locations:

  • ๐Ÿ“ DCIM/.thumbnails โ€” the main folder for thumbnails of photos and videos created by the camera or saved in the gallery. Files with the extension .thumb or .jpg (depending on the Android version) are stored here.
  • ๐ŸŽต Pictures/.thumbnails โ€” thumbnails for images downloaded from the Internet or created in graphic editors.
  • ๐Ÿ“„ Downloads/.thumbnails โ€” cache for previewing documents (PDF, Word) and APK files (if the mode is enabled display icons).
  • ๐ŸŽฌ Movies/.thumbnails or Video/.thumbnails โ€”thumbnails for video files (in some firmware, for example, on Samsung One UI or Xiaomi MIUI).

Important: these folders hidden by default. To see them, you need to enable the display of hidden files in the file manager (for example, in Total Commander, FX File Explorer or standard Files from Google). The path to them usually starts with /storage/emulated/0/ (internal memory) or /storage/XXXX-XXXX/ (SD card).

On devices with Android 11+ and shared storage (for example, on Samsung Galaxy or OnePlus), part of the thumbnails can be stored in a protected area /data/media/0/, access to which is possible only with root access. Also, some manufacturers (for example, Huawei or Oppo) use their own caching algorithms, so the paths may differ.

โš ๏ธ Attention: Do not confuse the folder .thumbnails with .thumbdata โ€”this is an outdated thumbnail format that was used in Android 4.x and earlier. Modern versions of the OS do not support it, but the files can remain on the device after updating.

2. How thumbnails are generated and updated

The process of creating thumbnails in Android is controlled by a system service MediaProvider (or MediaStorage on older versions). It works according to the following algorithm:

  1. Scanning: When adding a new file (photo, video, document) or connecting an SD card, the service scans the storage for changes.
  2. Generation: For each media file a reduced copy is created (usually 96ร—96, 128ร—128 or 512ร—512 pixels) and saved in the appropriate folder .thumbnails.
  3. Indexing: Information about the thumbnails is entered into the database media.db (located in /data/data/com.android.providers.media/databases/).
  4. Caching: Applications (galleries, file managers) load thumbnails from the cache, and not from the original files, which speeds up work.

The cache is updated automatically when:

  • ๐Ÿ“ท Adding new photos/videos (for example, after shooting or downloading).
  • ๐Ÿ—‘๏ธ Deleting files (thumbnails are not deleted immediately, but during the next scan).
  • ๐Ÿ”„ Rebooting the device or forced re-indexing (for example, via Settings โ†’ Storage โ†’ Clear media cache).
  • ๐Ÿ“ฑ Connecting to a PC in the mode File transfer (MTP).

On devices with Android 10+ function Scoped Storage (limited storage access) thumbnail generation process may vary. For example, applications are not allowed to create files in root folders, so some thumbnails are stored in isolated application directories (for example /data/user/0/com.android.gallery3d/cache/).

๐Ÿ“Š How often do you clear the thumbnail cache on Android?
Never cleared
Once a month
Only when the memory runs out
I use automatic cleaning
I donโ€™t know what it is

3. Why do thumbnails take up a lot of space and how to check it? data-i="108">At first glance, the thumbnails weigh little - a few kilobytes each. But if you consider that a modern smartphone can store

At first glance, the miniatures weigh little - a few kilobytes each. But if you consider that a modern smartphone can store 10 000+ photos and videos, the total cache size reaches 500 MBโ€“2. GBThis is especially noticeable on devices with:

  • ๐Ÿ“ธ 4K video โ€”high-resolution thumbnails are generated for them (up to 1024ร—1024).
  • ๐ŸŽจ RAW photos โ€”even small copies take up more space due to the format.
  • ๐Ÿ“‚ Duplicate files โ€”if you copy the same photos to different folders, a separate thumbnail is created for each.
  • ๐Ÿค– Customized firmware (for example, LineageOS or Pixel Experience), where caching algorithms may not be optimized.

To check how much space the thumbnails take up on your device:

  1. Open any file manager that supports hidden folders (for example, Solid Explorer).
  2. Go to /storage/emulated/0/DCIM/.thumbnails (or similar folder).
  3. Click on the folder and select Properties or Information โ€”its size will be indicated there.
  4. Repeat for other folders (Pictures/.thumbnails, Downloads/.thumbnails).

On some devices (for example, Samsung Galaxy s One UI), part of the thumbnail cache may be displayed in the Settings โ†’ Device care โ†’ Memory โ†’ Other applications โ†’ Media Storagesection. Here you can see how much space the service takes MediaProvider (including databases and cache).

File type Thumbnail size (pixels) Approximate weight of one thumbnails Typical cache size for 10,000 files
Photo (JPEG) 128ร—128 5โ€“10 KB 50โ€“100 MB
Video (MP4) 512ร—512 20โ€“50 KB 200โ€“500 MB
RAW photo 256ร—256 15โ€“30 KB 150โ€“300 MB
Documents (PDF, Word) 96ร—96 2โ€“5 KB 20โ€“50 MB
โš ๏ธ Attention: If you use cloud services (for example, Google Photos or Yandex Drive), they can be created own thumbnail caches in application folders. These files are not displayed in standard .thumbnails, but also take up space. To clear them, go to Settings โ†’ Applications โ†’ [Service name] โ†’ Storage โ†’ Clear cache.

4. How to safely clear the thumbnail cache without losing data

Deleting thumbnails is a safe procedure, since they are restored automatically the next time you scan media files. However, there are nuances:

  • โœ… Restoration: After clearing, the thumbnails will be recreated, but this may take time (from several minutes to an hour, depending on the number of files).
  • โš ๏ธ Gallery slowdown: Until the cache is updated, applications (for example, Google Photos or Samsung Gallery) will load original files, which may cause lags.
  • ๐Ÿ”„ Incomplete cleaning: Some thumbnails (for example, for system applications) may remain protected folders.

Cleaning methods:

Open a file manager with support for root or hidden folders

Go to /storage/emulated/0/DCIM/.thumbnails

Delete all files in the folder (or the folder itself - it will be restored automatically)

Repeat for Pictures/.thumbnails and Downloads/.thumbnails

Reboot the device for forced re-indexing -->

For devices without root access:

  1. Use application SD Maid (section CorpseFinder) or Files by Google (tab Cleaning).
  2. Manually delete folders .thumbnails via the file manager (for example FX File Explorer with root mode enabled).
  3. Clear the application cache Media Storage in the settings (Settings โ†’ Applications โ†’ Show system โ†’ Media Storage โ†’ Storage โ†’ Clear cache).

For devices with root access:

su

rm -rf /storage/emulated/0/DCIM/.thumbnails

rm -rf /storage/emulated/0/Pictures/.thumbnails

rm -rf /data/data/com.android.providers.media/databases/media.db

reboot

The last command reboots the device and initiates rescanning of media files.

๐Ÿ’ก

If after clearing the thumbnails are not restored, check if the service is disabled MediaProviderTo do this, enter in. terminal (via Termux or ADB): adb shell dumpsys media.camera | grep "enabled". If the result is false, enable the service via Settings โ†’ Applications โ†’ Media Storage โ†’ Enable

5. How to disable generation of thumbnails (and is it worth doing it)

In some cases, it makes sense to completely disable the creation of thumbnails - for example, if you:

  • ๐Ÿ“ฑ Use a smartphone with 16โ€“32 GB memory and every megabyte is welcome.
  • ๐Ÿš€ You prefer the speed of the gallery to the speed of opening it (thumbnails speed up the preview, but slow down the scanning).
  • ๐Ÿ”’ You work with confidential files and do not want their reduced copies stored in clear form.

Disablement methods:

  1. Via ADB (without root):
    adb shell pm disable-user --user 0 com.android.providers.media

    This command disables the service MediaProvider, but may cause the gallery and other media applications to not work. To get everything back, use:

    adb shell pm enable com.android.providers.media
  2. Through the developer settings (partial disabling):

    Activate Developer mode (click 7 times on Build number in the settings), then open Settings โ†’ System โ†’ For developers and disable the option Do not save thumbnails (if it is available on some firmwares (for example, MIUI) this parameter is called Disable cache thumbnails.

  3. Through modified firmware:

    In customized firmware (for example, LineageOS) you can edit the file /system/build.propby adding the line:

    ro.media.thumbnail.enabled=false

    After that, reboot device.

โš ๏ธ Attention: Disabling the generation of thumbnails can lead to:

  • ๐Ÿ–ผ๏ธ Empty previews in the gallery and file managers.
  • โš ๏ธ Errors in the operation of applications that depend on from MediaProvider (for example, Google Photos or WhatsApp).
  • ๐Ÿ”„ Slowdown opening folders with a large number of media files (the system will have to download the originals each time).

If you are not prepared for such consequences, it is better to limit yourself to periodically clearing the cache.

6. Transferring thumbnails to an SD card: is this possible?

On devices with support Adoptable Storage (for example, on Android 6โ€“8), you can transfer folders with thumbnails to an SD card formatted as internal storage. However, in modern versions of Android (starting from Android 9 Pie), this function is limited or completely removed due to Google's security policy.

Alternatives methods:

  • ๐Ÿ“ Symbolic links (symlink): Using Termux or ADB you can create a symbolic link from the internal memory to the SD card:
    ln -s /storage/XXXX-XXXX/DCIM/.thumbnails /storage/emulated/0/DCIM/.thumbnails

    Where XXXX-XXXX โ€”the identifier of your SD card (you can find it out through ls /storage/).

  • ๐Ÿ”„ Manual copying: Periodically copy folders .thumbnails to the SD card, and delete the originals. Minus - after a reboot they will be restored.
  • ๐Ÿ“ฑ Applications for transfer: Some file managers (for example, Root Explorer) allow you to transfer system folders to external storage, but require root access.

On devices Samsung s One UI or Xiaomi s MIUI there is a built-in function for transferring applications to an SD card, but it does not affect system folders with thumbnails. The only reliable way is to use root and edit paths in /system/etc/permissions/platform.xml (for experienced ones). users).

What happens if you transfer the thumbnails to the SD card and remove it?

When you remove the SD card, applications will not be able to find the thumbnails and will load the original files, which will slow down the gallery. In addition, the system can automatically restore folders .thumbnails on the internal storage during the next scan.

7. Problems with thumbnails and their solutions

Sometimes the thumbnail cache does not work correctly, which leads to the following problems:

Problem Cause Solution
Thumbnails are not updated after deleting files Database failure media.db or frozen process mediaserver Clear cache Media Storage or restart the device
The gallery shows old thumbnails of deleted photos The cache is not synchronized with real files Delete folders .thumbnails manually or use SD Maid
Thumbnails take up too much space Accumulation of duplicates or high cache resolution Clear the cache and limit the size of thumbnails through ADB
Applications do not see thumbnails Missing permissions to access folders or crashed MediaProvider Check permissions for applications or reinstall Media Storage

If the thumbnails completely disappeared are from the gallery, but the files are still there, try:

  1. Restart the device.
  2. Clear application data Media Storage (Settings โ†’ Applications โ†’ Media Storage โ†’ Storage โ†’ Clear data).
  3. Restore database media.db from backup (if available).
  4. Use an alternative gallery (for example, Simple Gallery or QuickPic, which creates its own cache.

On devices with Android 11+ and function Scoped Storage some applications may not see thumbnails due to access restrictions. In this case, this will help:

  • ๐Ÿ”ง Manually configure permissions via ADB:
    adb shell pm grant com.example.app android.permission.READ_EXTERNAL_STORAGE
    

    adb shell pm grant com.example.app android.permission.WRITE_EXTERNAL_STORAGE

  • ๐Ÿ“‚ Using SAF (Storage Access Framework) โ€”for example, opening files via Documents instead of direct access.

8. Alternative ways to manage thumbnails

If standard methods are not suitable, consider these options:

  • ๐Ÿ–ผ๏ธ Use of alternative galleries: Applications like Simple Gallery Pro or F-Stop have their own thumbnail caching mechanisms that can be flexibly configured (for example, limiting the cache size or storing it on SD card).
  • โ˜๏ธ Cloud services: Google Photos or Amazon Photos store thumbnails on their servers without taking up space on the device. Minus - Internet is required for viewing.
  • ๐Ÿ› ๏ธ Automation via Tasker: You can create a task that will clear the thumbnail cache on a schedule (for example, once a week). Example command for Tasker:
    Run Shell: rm -rf /storage/emulated/0/DCIM/.thumbnails/*
  • ๐Ÿ“ฑ Firmware with optimized cache: Some custom firmware (for example, Pixel Experience or Havoc-OS) have improved thumbnail management algorithms, including compression and deduplication.

For users who often work with a large number of media files (for example, photographers or video bloggers), there are specialized tools:

  • Thumbnail Cleaner (an application for clearing the thumbnail cache in one click).
  • Media Rescanner (forced update of the media file database).
  • Root Essentials (for advanced management of system folders, including .thumbnails).

If you use Android 12+, pay attention to function App Hibernation (in the developer settings). It allows you to โ€œfreezeโ€ rarely used applications, including their thumbnail cache, which saves space.

๐Ÿ’ก

Clearing the thumbnail cache is a safe procedure, but do not abuse it. Frequent deletion .thumbnails forces the system to constantly rebuild the cache, which can lead to increased performance. battery consumption and processor load.

FAQ: Frequently asked questions about thumbnails in Android

Is it possible to recover deleted thumbnails?

Yes, they will be restored automatically the next time you scan media files (usually after rebooting or connecting to the PC. If this does not happen, check if it is disabled). service MediaProvider.

Why did the gallery become slower after clearing the cache?

This is a temporary phenomenon. After cleaning, the system needs to re-create thumbnails for all files, which requires resources. After 10-30 minutes (depending on the amount of media), the speed will return to normal.

Is it possible to change the size of the thumbnails?

Yes, but only through editing system files (root is required). For example, in the file /system/etc/media_profiles.xml you can change the settings thumbWidth and thumbHeightHowever, this may lead to the gallery not working correctly.

Why do thumbnails take up more space than the original ones? photo?

This is unlikely, since thumbnails are small copies. Most likely, you are confusing them with application cache (for example, (For example, Google Photos or Instagram), which can weigh gigabytes. Check. folders /Android/data/[application_name]/cache.

How to disable thumbnails only for certain folders?

This is not possible using standard Android tools. However, you can:

  • Place files in a folder with a dot at the beginning of the name (for example, .private_photos) - the system will ignore it when scanning.
  • Use applications like Simple Gallery, which allow you to exclude folders from indexing.