Hide files (images) from anon users

I have a forum which is image heavy and I would prefer to have people to join to see the images instead of just consuming them, but also retain an open forum for SEO purposes.

It is possible to hide uploaded images, either natively, theme element or plugin, unless you are logged in?