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.



  • Roshan

    Thanks. It helped

  • Pingback: HTC One M8 tips and tricks – Part 3 |

  • Sunil Rai

    thanks its working

  • Sakthi L

    Can you please , how the “.nomedia” files are getting generated automatically?
    Ex ” i use Camera360 app , of which the images often are hidden. But i want them to appear on my gallery.
    P.S : it is really frustrating to delete “.nomedia” every time when i want those images back in the gallery.
    Any fixes for this?

  • Jonas Karlsson

    Tjenare! Jag placerade tillfälligt en .nomedia fil i en mapp, för att lättare kunna välja vilka mappar som jag skulle döljas. När jag sedan tog bort den så syns inga undermappar alls i galleriet. Hur återställer jag detta? Har provat att starta om, lägga dit och ta bort filen men inget hjälper.
    // Jonas

    • Pröva att nollställa “media storage” (media lagring), det är den processen som visar saker. Inställningar > appar > alla > media lagring, “rensa data” och “rensa cace”. Starta om. Och sen tar det upp till 30 min innan du ser allt igen. Eller borde se allt. Ingen dum ide att ta backup på DCIM typ innan. Ifall..

      • Jonas Karlsson

        Tack som f_n !! Det funkade perfekt. Tack Tack !!!!

  • George I.