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
.thumbor.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.thumbnailswith.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:
- Scanning: When adding a new file (photo, video, document) or connecting an SD card, the service scans the storage for changes.
- Generation: For each media file a reduced copy is created (usually
96ร96,128ร128or512ร512pixels) and saved in the appropriate folder.thumbnails. - Indexing: Information about the thumbnails is entered into the database
media.db(located in/data/data/com.android.providers.media/databases/). - 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/).
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:
- Open any file manager that supports hidden folders (for example, Solid Explorer).
- Go to
/storage/emulated/0/DCIM/.thumbnails(or similar folder). - Click on the folder and select
PropertiesorInformationโits size will be indicated there. - 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 toSettings โ 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:
- Use application SD Maid (section
CorpseFinder) or Files by Google (tabCleaning). - Manually delete folders
.thumbnailsvia the file manager (for example FX File Explorer with root mode enabled). - Clear the application cache
Media Storagein the settings (Settings โ Applications โ Show system โ Media Storage โ Storage โ Clear cache).
For devices with root access:
surm -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 GBmemory 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:
- Via ADB (without root):
adb shell pm disable-user --user 0 com.android.providers.mediaThis 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 - Through the developer settings (partial disabling):
Activate
Developer mode(click 7 times onBuild numberin the settings), then openSettings โ System โ For developersand disable the optionDo not save thumbnails(if it is available on some firmwares (for example, MIUI) this parameter is calledDisable cache thumbnails. - Through modified firmware:
In customized firmware (for example, LineageOS) you can edit the file
/system/build.propby adding the line:ro.media.thumbnail.enabled=falseAfter 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/.thumbnailsWhere
XXXX-XXXXโthe identifier of your SD card (you can find it out throughls /storage/).- ๐ Manual copying: Periodically copy folders
.thumbnailsto 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
.thumbnailson 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.dbor frozen processmediaserverClear cache Media Storageor restart the deviceThe gallery shows old thumbnails of deleted photos The cache is not synchronized with real files Delete folders .thumbnailsmanually or use SD MaidThumbnails 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 MediaProviderCheck permissions for applications or reinstall Media StorageIf the thumbnails completely disappeared are from the gallery, but the files are still there, try:
- Restart the device.
- Clear application data
Media Storage(Settings โ Applications โ Media Storage โ Storage โ Clear data).- Restore database
media.dbfrom backup (if available).- 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
Documentsinstead 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
.thumbnailsforces 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.xmlyou can change the settingsthumbWidthandthumbHeightHowever, 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.