I have a Motorola Moto E (Gen 1). I've observed that the gallery app from Motorola takes up 50.13 MB under 'Data'.
My question is: Is it safe to select the 'Clear Data' option? Will I lose the pictures stored if I click on it?
You will not lose any of your photos, if CLEAR DATA operation is performed, it is completely safe to do so. This just means that your preferences have been reset and the cache has been cleared.1 Cache is generated only for providing fast access to gallery files.
When you restart your gallery after this operation, it'll take some time to load and it will once again show you how to navigate through the Gallery app.
1: Pressing the Clear Data button automatically clears the cache too. This is can be seen on the screen right then because when you press the Clear Data button and once the data is cleared, you will notice that under the Cache section, Cache shows 0.00KB and the Clear Cache button is disabled too.
The given answer is correct, I just want to clarify:
By pressing Clear data on any app, you're clearing application's data, stored in
/data/data/[package.name]. It doesn't contain any images of yours, nor you can access it unless you root your device. Cache also belongs to data, and it's inside
/data/data/[package.name]/cache. Your images, on the other side, are in
/sdcard/DCIM/ (probably, it differs from manufacturer to manufacturer). You see how the whole path is different? Because they are in the completely different parts of the device. You know how you have
D:\, etc. partitions on Windows? Well, these folders are on the different partitions, they just don't have drive letter prepended to them.
So, for the gallery app, if you press
Clear data, you are in reality deleting
/data/data/com.android.gallery, and I suppose most of it is taken up by cache, which is made up of thumbnails. You see, loading gigabytes of photos in memory just to display a small preview isn't terribly efficient. And because it's slow and memory-hungry, Gallery resizes those multi-megapixel images to something smaller and puts those small images, thumbnails, into
/data/data/com.android.gallery/cache, so it doesn't have to recreate them every time. If you delete them, it'll be smart enough to do it again next time it needs previews - take the whole picture, read every 16th pixel (for example), make a new picture out of it and store it in cache. If you go ahead and access all pictures in Gallery now, you'll have those 50MB back in no time (I suppose there isn't a bug in the application and it cleans cache properly).
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?