Use Pajamas::AvatarComponent in avatars_helper.rb
Wiki #509393 (closed), Commit details #510474 (closed), File Blob #510465 (closed), Blame #510485 (closed), etc. use user_avatar from app/helpers/avatars_helper.rb in HAML templates.
This uses user_avatar_without_link which returns a <img> element with avatar and s24 (size) classes. These use local GitLab component styles in ssets/stylesheets/components/avatar.scss instead of gl-avatar class and styles from GitLab UI.