Add options for showing avatar as icon

Moved image utilities to plugin class