You can always buy a new lens online (just search HTC One M8 Lens, there's a pair for 6 dollars. I can't post links yet, otherwise I would).
All you do is pull of the old lens and put the new ones on. Don't have to take off the back of the phone or anything. I sent mine in for something behind the lens, but it was within the 15 day no questions exchange policy right after buying it. Still was an extreme hassle.
Alternatively, you may also be having a really common problem with your M8, involving a coating that they put on the lens at the factory. Almost everybody does (Again, would post link, but can't yet, haven't made enough posts. Just search android forum for the "HTC One (M8) Camera Lens Cover Issue").
Mine did and it made the photos blurry. The solutions here do work.
Posted via the Android Central App