Say you want to show a picture to someone and suddenly while browsing the Gallery, a NSFW meme, or some other not-so-good picture you received the other day in WhatsApp shows up. Isn’t that moment embarrassing? In Android, there is a simple trick to avoid this.
Hide WhatsApp photos &Â videos from Gallery
The .nomedia
file performs the trick here. A .nomedia
file tells the media scanner not to display the contents of the folder in which it is present. Go to the location of WhatsApp Media folder (Usually Internal Storage/External Storage > WhatsApp > Media > WhatsApp Images or WhatsApp Video
) and create the .nomedia
file. Note that, the file begins with a period.
Create a .nomedia
file in WhatsApp media folder

If you have Android Marshmallow running on your phone, then you are lucky — you can do this with the help of the native File Manager itself. Go to Settings > Storage & USB > Internal storage > Explore
and search for .nomedia
file by tapping the search icon present in the top. Several occurrences of the .nomedia
file may be found.
Long press any one of it, then tap the three dots present in the top-right and click “Copy to…” You need to copy it into the WhatsApp media folder. You may use the hamburger menu (≡) in the top-left, or use the tree structure menu present displayed at the top and browse to the WhatsApp media folder (either WhatsApp images or video) and select “Copy.”
For other versions of Android, you can use a File Manager app to create a .nomedia
file in the WhatsApp media folder. In case, you can use the default .nomedia
file present in WhatsApp profile pictures or any sent folder of WhatsApp media. You can copy it and paste in the required folder through the app. You can also create a .nomedia
file on your computer and transfer it via USB cable to phone’s storage.
You may also use .nomedia
file to hide any directory from appearing in Gallery.
Unhide WhatsApp media in Gallery
If you want to roll-back the changes and make all the media to appear again in Gallery, delete the .nomedia
 file present in the respective folders.