The bottom line about the M8, everything is outstanding except for the cameras.
The main 4uP camera, will be great for you only if you want to take photos to share on (Instagram, Facebook, .... etc) So is the M8 camera bad? Well, it depends on what kind of user you are? What type of photos do you take.
Now, regarding the front camera. Before, I thought a 5MP front camera is cool. Until recently one of my friends got a low budget Galaxy Grand Prime that also has a 5MP front camera. As we compared the photos, his photos turns out to be much better than mine.
So if taking photos is a main thing for you, then I don't advice you to take the M8.
If taking photos is a main thing for me, and I want an HTC, then I would go for the HTC Desire Eye, that phone is built for taking photos.
Now Desire Eye cost almost the same as One M8, sadly, it doesn't has a premium design, you will feel like holding a low budget phone.
Sent from my HTC One M8