- type ||= :nil
.card.h-100.userbox
  %img.userbox__header{ src: user.profile_header.url(:mobile) }
  .card-body
    %img.userbox__avatar{ src: user.profile_picture.url(:small) }
    %a.profile__name{ href: user_path(user) }
      - unless user.profile.display_name.blank?
        .profile__display-name
          = user.profile.display_name
      .profile__screen-name
        = user.screen_name
    = render 'user/actions', user: user, type: type

- type ||= :nil
.card.h-100.userbox
  %img.userbox__header{ src: user.profile_header.url(:mobile) }
  .card-body
    %img.userbox__avatar{ src: user.profile_picture.url(:small), loading: :lazy }
    %a.profile__name{ href: user_path(user) }
      - unless user.profile.display_name.blank?
        .profile__display-name
          = user.profile.display_name
      .profile__screen-name
        = user.screen_name
    = render 'user/actions', user: user, type: type

Use appropriate image sizes and lazy loading in userbox
Use appropriate image sizes and lazy loading in userbox
