What is a .nomedia file, and how to hide photos with one
An empty file that tells your gallery to look away.
A .nomedia file is an empty file named .nomedia. When Android finds one in a folder, it leaves that folder's photos, videos and audio out of the media library, so most gallery and music apps stop showing them. It doesn't lock or encrypt anything: the files are still there for any file manager or computer.
Why you have them already
Plenty of apps drop a .nomedia file into their own folders: thumbnails, stickers, cached images and so on. Without them, your gallery would fill up with junk. If you've ever turned on "show hidden files" in a file manager and seen .nomedia scattered about, that's why.
How to make one
- Make a new folder for the photos you want to hide, for example in Pictures.
- Inside it, create an empty file and name it exactly .nomedia: a dot, then nomedia, all lower case, with no extension. Files by Google can't create a blank file, so use a file manager that has a New file option.
- Move the photos into that folder.
- Give Gallery a minute, or restart it. The folder should drop out of view.
Many file managers hide anything starting with a dot, so you may need to turn on Show hidden files to see the .nomedia file afterwards.
A shortcut. Naming the folder itself with a dot at the front, like .private, has the same effect on most phones.
To undo it
Delete the .nomedia file, or rename the folder without the dot. Then open the gallery again. It can take a little while, or a restart, for the photos to come back.
What it doesn't do
- No lock. Anyone who opens a file manager, or plugs your phone into a computer, can browse straight to the folder.
- No encryption. The photos are exactly as they were.
- Not every app respects it. Some gallery apps scan your storage themselves and ignore .nomedia, so the photos show up anyway.
- It doesn't remove anything already uploaded. If Google Photos backed the photos up before you moved them, they're still in your account.
When you need more than out of sight
A .nomedia file is a good way to stop memes and downloads cluttering your camera roll. For photos you actually need to keep private, they need a lock and encryption. Dobr encrypts each photo before it's saved, opens with its own pattern, and has no internet permission. Our guide to stopping photos showing in your gallery compares the options.
Last checked 2026-11-04. Phone menus change between Android versions and brands, so labels on your phone may differ slightly.