Responsive Background Image Demo

You should see an image as the background in the header of this page (yes, it looks kind of  terrible, it's just a demo). This is using the bg_image_formatter module. Set ups like this are especially challenging for CSP. Generating content-specific CSS might not be tenable on a content-heavy site, so the module injects inline styles to display the image in the HTML head. 

So the Attach Inline generates a hash as the page is being rendered to add to the CSP, so that it works with CSP. This is actually a part of an unreleased  3.x version of the module. I should talk to the maintainers (oh, wait, that's me... I sort of forgot about this module...). The 3.x functionality has been ported over to a patch for this demo.

My position on this approach is to just avoid it altogether. There are other ways to get text to float over images. The reason I've included this little demo was just to show how much of a pain this can be.

Image