Spoiler content only visible for registered users

It would be perfect when users can see only the “spoiled” version of pictures and text, so that they see ther eis something. And if they click maybe a forward to register/login if not logged in.

Do you think this should be easy possible with js/css?