Mitigate XSS Attacks with Content Security Policy

A post was split to a new topic: What’s the suggested method to use secure images?