How to fix: Odd folders shows up in Gallery app on HTC One M8

Pretty much that. Folders that often contains images from apps etc, this on my phone was from Facebook Messenger.

And that is the clue that will help us solve this. I don’t even go into “why”, I just go into “fix it” mode.

How? it surely must copy those folders to Gallery?

Actually it doesn’t, what it does is just to include those folders into the gallery view. Nothing gets copied anywhere.

So, how do you tell it to not include those?

That’s actually pretty simple. The method used here is simply that we create and save a file into a folder, and that file will tell Gallery “don’t ever include what’s here and below (folders under that)”.

This you might be able to do on phone, but I think it’s MUCH easier to do it on computer.

First you need to create a .nomedia file

This is actually pretty simple, and just requires the use of Notepad on computer. Just create a new blank file, it’s important that it’s empty and doesn’t contain a single letter. The magic comes when you save it.

As file name you enter


It’s very important that you start with DOT (as in .), and then followed directly by “nomedia”.

Instead of using “save as type” as “text documents you MUST select “All files”.


Then you save it to desktop or somewhere where you remember where, tried to save directly to my M8 but that got too hard for Notepad.

EDIT: Included a zip of it here, you can use WinZip directly on your phone to simply unzip it to the correct place.

In the next step you then need to move it to the folder which is a one step above the folder(s) that you don’t want Gallery to include in it’s scans.



So, just connect your phone to computer. Or transfer the .nomedia via dropbox or whatever you want to use.

I had before this step checked (image details) just where this images was located, and it was under an app folder that’s under \Android\Data. That is where apps on internal storage saves their data, and since this is about app data: that’s the correct place.

On computer the correct place to put the .nomedia file is

\Internal storage\Android\Data

And, that is pretty much it. On my phone those folders just went away when I opened Gallery again.

If it’s just one or two folders that it includes, the easiest way is to just hide those folders inside the Gallery app.

3 dots menu > Show/hide albums and just clear those you don’t want to include.