Cache galleries on Xiaomi smartphones (including Redmi and POCO models) are temporary files that are created to speed up the download of thumbnails of photos and videos. Over time, this cache grows to several gigabytes, taking up precious space in the deviceโs memory and slowing it down.
Unlike browser cache or social networks, cleaning gallery cache requires a special approach.The fact is that MIUI integrates media files with Mi Cloud services and artificial intelligence functions (for example, automatic sorting by person or place). Wrong actions can lead to loss of albums, failure of synchronization or even deletion of original photos. In this article, we will discuss 5 safe ways to clean the cache of the gallery on Xiaomi, including hidden settings and tools for experienced users.
Why does the gallery cache take up so much space?
The main reason for the cache growth is the mechanism of the Gallery app in MIUI, and each time you view photos, the system creates:
- ๐ธ Miniatures (thumbnail) โ reduced copies of images for quick loading in the album;
- ๐จ Previews for editing โ temporary files with filters or cropping applied;
- ๐ Metadata โ geolocation information, shooting date, camera parameters;
- ๐ค AI files โ data for the operation of facial, object and scene recognition functions (AI Scene Detection).
For example, if you open a photo in 12 MP (~4 MB), the gallery can create up to 3-4 temporary files with a total weight of up to 10-15 MB. When you use the camera actively, 1-3 GB of garbage accumulates per month, which is not removed automatically. Moreover, in MIUI 14+, the gallery cache can be duplicated in the folders.thumbnails and DCIM/.cache, which makes it difficult to find.
The problem is particularly acute in budget models (Redmi 9A, POCO M3) with limited storage (32-64 GB), where gallery cache can take up to 10-15% of the total space, and standard cleaning tools (such as the built-in Optimizer) often ignore these files, considering them to be โsystemicโ.
Method 1: Clearing the cache through the settings of the Gallery application
The easiest and safest method is to use the built-in MIUI tools.It is suitable for all Xiaomi models, including the Redmi Note 12, POCO X5 and older devices on the MIUI 12-14.
- Open the phone's Settings.
- Go to the Appendix section โ Application management.
- In the search bar, type "Gallery" and select the application (image icon).
- Press Warehouse.
- Slip the โClear Cacheโ button (not to be confused with โClear Dataโ โ this will remove all the app settings!).
Once cleaned, restart the phone. This method only deletes temporary files without affecting the original photos. However, it has a limitation: it does not clear the thumbnail cache stored in hidden folders. Additional steps will be required to completely clean (see Method 3).
Backup important photos in Mi Cloud or Google Photo|
Check the available space on the device (should be โฅ500 MB)|
Close all applications that work with media files |
Connect your phone to charge (for models with a weak battery)-->
Method 2: Using the built-in MIUI Optimizer
MIUI has its own garbage cleaner tool, the Optimizer (formerly called Security), which can find and delete unwanted files, including gallery cache, but often skips some data.
- Open the Optimizer app (the shield icon).
- Go to the Cleanup tab (or Deep Cleanup in newer versions).
- Wait for the scan to be completed.
- In the "App Cache" section, find the Gallery and tick it.
- Click "Clean" (in some versions - Delete).
Important: The Optimizer may show an incomplete cache volume, for example, if the actual size of the temporary gallery files is 2.3 GB, the tool can only display 1.5 GB. This is because part of the cache is system processes and is not displayed in the interface.
๐ก
If Optimizer doesn't find the gallery cache, try opening the Gallery app first, scrolling through a few albums, and then re-starting the scan, which will force the system to update the temporary files.
Method 3: Manually clean hidden cache folders
For advanced users who are ready to work with the file system, there is a manual cleaning method that allows you to delete all temporary files, including those that are not visible through the standard settings.
Instructions:
- Open the file manager and enable the display of hidden files (in Mi File Manager: โฎ โ Settings โ Show hidden files).
- Go to the root directory of internal memory (/storage/emulated/0/).
- Find and delete the contents of the following folders: DCIM/.thumbnails โ photo thumbnails; DCIM/.cache โ editing cache; Pictures/.thumbnails โ thumbnails for other albums; Android/data/com.miui.gallery/cache โ cache of the Gallery app.
Reboot the phone.
What to do if you canโt see the.thumbnails folder?
โ ๏ธ Warning: Don't delete the.thumbnails or.cache folders themselves, just their contents! Deleting the folders can cause a gallery to crash. Also, don't touch files with the.nomedia extension, they are responsible for hiding media files from the scanner.
Method 4: Cleaning with Recovery Mode (for advanced users)
If standard methods donโt work and gallery cache takes up a critical amount of space (e.g. >5GB), you can use Recovery Mode, which is suitable for root-free devices, but requires caution.
Instructions:
- Turn off the phone.
- Press the Power + Volume buttons up at the same time and hold them for 10-15 seconds until the Mi logo appears.
- From the Recovery menu, select the language (usually English by default).
- Go to the Wipe & Reset section โ Wipe Cache.
- Confirm the action and wait for the process to be completed.
- Restart the device (Reboot) โ Reboot to System).
This method clears the entire cache of the system, including the cache of the gallery, but does not affect user data. However, after a reboot, the first opening of applications (including the Gallery) may take longer, since the system will have to recreate temporary files.
๐ก
Cleaning through Recovery Mode does not delete personal photos or videos, but resets the settings of some applications (for example, saved passwords in the browser).
Method 5: Automatic cleaning with ADB (for technical users)
For those familiar with Android Debug Bridge (ADB), there is a way to clear the gallery cache through the command line, which is the most effective method, since it allows you to delete all temporary files, including those that are not visible in file managers.
Instructions:
- Install ADB on your computer (instructions are available on the XDA Developers website).
- Turn on the phone "Debugging by USB" (Settings โ About Phone โ MIUI version โ press 7 times, then go back to Settings โ Additional โ For developers โ Debugging by USB).
- Connect the phone to your PC and execute commands in the terminal: adb shell pm clear com.miui.gallery This command will reset the cache and data of the Gallery app to factory settings.
You should also disable unnecessary MIUI functions that generate additional cache:
- Go to Settings โ Display โ Animation and transitions and turn off โNipature Animationโ.
- In gallery settings (โฎ โ Settings off "AI-albums" and "Scene Recognition".