Owners of smartphones based on the operating system Android sooner or later face a lack of free space in the internal memory. When performing a detailed analysis of the file system through a file manager or connecting to a computer, many discover a hidden directory with the name .thumbnails. This folder often grows to a gigantic size, occupying several gigabytes, which raises natural questions among users.

Many believe that this is system garbage or the result of malicious software, but in reality the mechanism of this directory is much more prosaic and useful for the performance of the device. Understanding how this cache is formed will allow you to properly manage your smartphone's memory without the risk of damaging system files or losing important data.

In this article, we will take a closer look at the nature of the appearance of thumbnail files, explain why they are not deleted automatically, and provide step-by-step guide for safely optimizing storage. You will find out whether it is worth completely blocking the creation of these files or whether it is better to periodically clean them manually.

Purpose and principle of operation of the thumbnail cache

The folder .thumbnails serves as storage for thumbnails of images and videos that are in the gallery of your device. When you open the Gallery app or any other file manager with preview, the system needs to instantly display the contents of the folders. If a smartphone read and scaled the original high-resolution files every time, the process of flipping through the tape would turn into a painful wait.

To speed up this process, the operating system Android creates small copies - the so-called thumbnails or thumbnails. These files are significantly smaller in size and lower resolution, allowing the processor and GPU to quickly render the image mesh. When you first open a photo folder, the system generates these thumbnails and saves them in a hidden cache.

It is important to note that the files in this directory are not full-size duplicates of your photos. This is technical service content that can be recreated at any time. However, since the original photos can be deleted by the user, but the cache cannot, over time, โ€œorphanedโ€ thumbnails accumulate in the folder, which no longer correspond to any real files on the device.

The cache update mechanism works automatically: when new photos are added, new thumbnails are created, but the mechanism for automatically clearing old or deleted thumbnails in different versions Android works in different ways, often causing failures. This is why the folder can bloat uncontrollably, taking up precious megabytes and even gigabytes of memory.

๐Ÿ’ก

If you often take high-resolution photos (48 MP or higher), the size of the .thumbnails folder will grow much faster due to the complexity of processing the original data.

Folder structure and file types

Inside the directory .thumbnails, which is usually located along the path /DCIM/.thumbnails or in the root of the internal memory /storage/emulated/0/.thumbnails, files of specific formats are stored. Most often you will find files with the extension .jpg, which are standard images, but there may also be binary cache files of the media scanner database.

The file names in this folder are often hashes or long character sets, which makes it difficult to manually identify the contents without special software. The system assigns such names for uniqueness and quick search for a match between the thumbnail and the original in the database. MediaStore.

The following table describes the main characteristics of the files found in this directory:

File type Extension Average size Purpose
Photo thumbnail .jpg 10โ€“50 KB Quick preview in gallery
Video thumbnail .jpg 20โ€“80 KB Video preview in the file list
Database cache .db / no 1โ€“10 MB Indexing file paths
Temporary file .tmp Various Remains of an interrupted scanning process

It is worth considering that the storage structure may differ depending on the shell manufacturer. For example, on smartphones Samsung with a shell One UI or devices Xiaomi s MIUI, algorithms for compressing and storing thumbnails may have their own characteristics. Sometimes the system creates multiple levels of folder nesting to sort thumbnails by date or album.

Technical Encoding Details

Thumbnails are often encoded using a low quality JPEG compression algorithm (around 60-70%) to minimize size while maintaining image recognition. This allows you to store thousands of thumbnails, taking up space equivalent to several full-fledged photographs.

Why does the folder take up so much space

The main reason for the growth of the folder .thumbnails lies in the lack of an effective self-regulation mechanism in some versions of the operating system. When a user deletes a photo from the gallery, the original is erased, but the corresponding thumbnail is often left "orphaned" in the cache. Over time, there are more such orphaned files than actual ones.

In addition, modern smartphone cameras take pictures with enormous resolution. The process of generating a thumbnail for a 100-megapixel photo requires more processing power, and sometimes the system creates multiple versions of the thumbnail for different viewing modes (list, grid, detail view), which also increases the amount of space it takes up.

โš ๏ธ Attention: Do not try to manually rename or move files within a folder. .thumbnails. This will break connections in the media scanner database, and the gallery may stop displaying previews or even freeze on launch.

Another factor is the operation of third-party applications. Messengers, social networks and photo editors can save their own versions of thumbnails to this or adjacent directories, duplicating the efforts of the system gallery. If you actively use WhatsApp or Telegram, the load on the thumbnail cache increases many times due to the constant flow of media content.

๐Ÿ“Š How often do you check the used memory on your phone?
Weekly
Once a month
Only when the memory is full
I never check

Safe ways to clear the cache

The most reliable and safe way to free up space is to use built-in system tools or third-party utilities to clear the cache, rather than manually deleting files through Explorer. Manual deletion is possible, but requires compliance with a certain sequence of actions so that the system correctly rebuilds the indexes.

Before starting the procedure, it is recommended to create a backup copy of important data, although the risk of losing the photos themselves when clearing the thumbnail cache is minimal. You are deleting only temporary preview files, not the originals.

Here is a step-by-step algorithm for safe cleaning:

  • ๐Ÿ“ฑ Go to Settings your device and find the section Applications.
  • ๐Ÿ” In the list of applications, select โ€œGalleryโ€ or โ€œMedia storageโ€ (Media Storage).
  • ๐Ÿ—‘๏ธ Press the button Clear cache (not to be confused with โ€œClear dataโ€, although in this context clearing media storage data is also acceptable and safe for personal photos).
  • ๐Ÿ”„ Reboot your smartphone to allow the system to re-index the files and create a fresh, optimized cache.

If you prefer manual deletion through the file manager, you will need access to hidden files. Enable the โ€œShow hidden filesโ€ option. files" in the Explorer settings, find the folder .thumbnails and delete its contents. After that, be sure to restart the device.

โ˜‘๏ธ Checklist before cleaning

Done: 0 / 4

Is it possible to completely prohibit the creation of thumbnails

Many users are interested in whether it is possible to permanently solve the problem by prohibiting the system from creating the folder .thumbnails. Technically this is possible, but this approach has serious side effects that can make using the gallery inconvenient.

There is a popular method of โ€œfreezingโ€ a folder: its essence is that you delete a directory .thumbnails and create a regular file in its place with the same thing. name. Since the operating system cannot create a folder with a name that is already occupied by a file, the process of generating thumbnails is blocked.


Action algorithm:

1. Delete the .thumbnails folder

2. Create an empty file with the name .thumbnails (without). extensions)

3. Deny writing to this file (if you have root access)

However, using this method will lead to the fact that when you open the gallery, the phone will re-generate the preview on the fly every time. This will cause noticeable slowdowns in the interface, increased battery consumption and heating of the processor. On devices with weak hardware, scrolling through hundreds of photos will become almost impossible.

โš ๏ธ Attention: The method of replacing a folder with a file may conflict with system updates. During a major update Android or reset, the system may try to restore the directory structure, which will result in an error or automatic deletion of your stub file.

A more reasonable compromise is to use cleaner applications that automatically clear the thumbnail cache on a schedule, for example, once every week. This allows you to maintain a balance between gallery performance and free memory space.

๐Ÿ’ก

Completely blocking thumbnail creation saves space, but critically slows down the gallery. It is recommended to use periodic cleaning instead of complete blocking.

Impact on performance and battery

The accumulation of gigabytes of junk files in a folder .thumbnails affects not only the amount of available memory. A smartphone's file system works less efficiently when it has to serve huge directories with thousands of small files. This can result in increased response time for I/O operations.

The process of constantly scanning background and updating the bloated cache causes the processor to wake up more often. As a result, you may notice that the smartphone began to discharge faster in standby mode, although there were no obvious active applications running.

Regular storage optimization helps maintain stable operation of the device. If you notice that the gallery takes longer to open than usual or that friezes appear when scrolling the feed, first check the size of the thumbnail folder. In 90% of cases, the problem is solved by cleaning it.

Remember that modern file systems, such as F2FS or ext4used in Androidare sensitive to fragmentation. A large number of deleted and newly created thumbnail files contributes to fragmentation, which over time reduces the overall speed of writing and reading data.

Connecting with an SD card

If you store photos on a memory card, the .thumbnails folder may be duplicated on it. This is especially critical for cards with low write speeds (Class 6 and below), where constantly overwriting the cache can quickly destroy the card.

Frequently Asked Questions

Is it safe to delete the .thumbnails folder manually?

Yes, it is safe to delete the contents of this folder for your personal photos and video. You will only delete temporary preview files. However, after deleting, when you first launch the gallery, the phone may freeze a little until it creates new thumbnails.

Why does the folder appear again immediately after deletion?

This is normal system behavior. As soon as you open a gallery or file manager, the system service MediaScanner automatically begins generating new thumbnails to display the content. You can completely get rid of it only by replacing the folder with a file, but this is not recommended.

Is it possible to move the .thumbnails folder to an SD card?

You cannot change the path to the system thumbnail cache using standard tools. Android . This folder is always created in internal storage to ensure maximum access speed. Transferring to a memory card would slow down the gallery due to the slower reading speed of microSD cards.

Does the folder take up space in the cloud storage when synchronizing?

No, services like Google Photos or Yandex.Disk only synchronize original media files. Service folders starting with a dot (hidden), such as .thumbnails, are ignored by synchronization algorithms and are not uploaded to the cloud.

How to find out which application creates the most sketches?

It is difficult to do this using standard means, since all the sketches are lumped together. However, if you install a third-party file manager with a disk analyzer, you will be able to see which folder is consuming the most resources. Often the culprits are instant messengers that save media to a shared gallery.