improve basic image avatar view
minor cleanup and better error conditions