As to how to recognize it, I think it's easy for humans to do so. And how do we train computers to recognize it? Well, if we can teach it to recognize cars, bikes, etc from photos I'm sure extremist ideology shouldn't be impossible to achieve with some helping hands from people.
And besides, as I said in another comment. I don't have all the answers, just like I don't have an answer on how to teach computers to recognize X in photos flawlessly, but I think this is something we should start working on.