1. Home
  2. Mobile

How To Prevent A Directory From Being Scanned By Android Gallery

The quick and smooth loading of your picture Gallery lasts only while your Android device is new or freshly wiped. After you’ve filled your device with apps, music and picture albums to your heart’s content, it begins to take more than its due share of time to scan your SD card for images, loading everything from pictures taken from the camera to wallpapers, album art and extracted icon packs. Generally, users don’t want album art and icons cluttering the gallery and leeching its loading speed. Some might even wish to hide a particular directory or picture album from the gallery. If either of the aforementioned holds true for you, join us after the jump for the solution.

While most gallery apps, such as the Sense and MIUI native galleries, might allow you to hide directories from the interface, they usually don’t stop loading such directories on launch. Also, this method doesn’t ensure your privacy as hidden directories can be revealed easily from within the app.


To prevent your Gallery app from scanning these directories at launch, you must employ one of the following methods. If you try one of the following shortly after launching your Gallery, you will have to refresh (or force-close and reopen) it to view the changes made.

Method 1 – Creating A .nomedia File

.nomediaUsing any file explorer/manager application (such as Astro File Manager or File Expert), navigate to the directory that you want hidden and create an empty file titled “.nomedia.

One way to do so is to:

  • Copy an existing text (.txt) or even an image (.jpg/.jpg) file to said directory,
  • Open it in a text editor (hold down on the file and select the appropriate option from the context menu that appears),
  • Delete its contents (hold down on the text, Select all and Delete), save changes and exit,
  • Rename it to “.nomedia” (hold down on the file again and select Rename from its context menu).

This method disables media scanning on the chosen directory, causing the Gallery to skip the directory altogether at launch.

Method 2 – Adding A Dot Prefix

dot-prefixUsing any file explorer/manager application, locate the directory that you want hidden and add a “.” before its name (“.directoryname”).

If you’re using Astro, you’ll have to hold down on the directory and select Edit > Rename from its context menu to do so.

This method converts the chosen folder into a hidden directory. File explorers like Super Manager, eFile and MIUI’s native file explorer do not have the option to view hidden folders enabled by default. So if your altered directory disappears from the interface, do not be alarmed. It is still there.

You may enable said option later to revert the changes you made. Alternatively, you can always connect your device to your computer and mount the SD card to do the same. The dot prefix hides the directory on Linux-based systems only. You’ll be able to to view them if, say, your computer is running Windows.

Method 3 – Using Super Manager Or .nomedia Manager

If you’re using Super Manager, you can disable media scanning for multiple directories by selecting the check box in front of each and tapping the toggle media scanning option below. The following screenshot (left) should clear things up.


If you’re looking for a quicker, more user-friendly solution, you might want to try StudioKUMA .nomedia Manager.

Both apps essentially provide you with one to two-tap alternative to creating a .nomedia file within the desired directories (Method 1). If you think you’ll need to enable and disable media scanning on folders repeatedly, it is best that you install one of the mentioned apps, otherwise, the manual method should suffice.

Super Manager
Super Manager
.nomedia Manager
.nomedia Manager

Download Super Manager Lite

Download StudioKUMA .nomedia Manager

[via XDA Developers]

Leave a comment