Would serving attachment previews from a separate domain, like fastmail-usercontent.fm, help?
There should be a strict whitelist of allowed content types, and anything not on that list should be download only. The trouble is, people tend to put "image/*" on that list, because they don't know what an SVG is or what it can do.