Skip to content

Send resize parameters for avatars

Tim Zallmann requested to merge tz-frontend-avatar-resizing into master

What does this MR do?

  • Adds the width query string parameter to lazy loaded avatars, so that either our Backend or the CDN can send an accordingly resized image. It tries to use mainly the set width attribute or it will use the rendered width
  • To make it easier and JS overhead smaller added to the rails universal avatar handler already the query parameter
  • Right now we have only the possibility to resize + optimise through the CDN so if no CDN in place to pick it up those parameters will be simply ignored
  • It is planned to this as soon as it is on staging with the gitlab.com CDN

I noticed some of the avatars on the page are currently shown without the CDN url so there it won't have any impact, idea is to update those also in a later MR.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

To make the page load faster

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#48397 (moved)

Edited by Mike Greiling

Merge request reports