Thursday, November 16, 2023
1 change · 17.0
Enhancements to existing features
Portal pages like tickets and tasks were loading slowly because they were downloading oversized avatar images. This fix reduces the avatar file size from the largest version to a smaller one that still looks perfect on screen, significantly improving page load times especially for users with slower connections.
Original PR description
## Description Portal routes `/my/tickets` or `/my/tasks` were reported slow to load with many items. ## Analysis The avatars that are loaded are of too large sizes (encoded in base64) compared to their rendering size. `o_avatar` limits the dimensions to `1.7145em` (roughly `27px` on desktop), so it's useless to load `avatar_1024` for those image sources. This has a significant impact when the user has a slow connection, the server is hosted far away from the user, or the images used are of badly compressed (so each images takes a quite a few MiB). ## Fix Scan for all instances of the usage of `avatar_1024` on an `<img>` with the class `o_avatar` and reduce it to `avatar_128`. ## Reference opw-3470171 ## Linked PR https://github.com/odoo/odoo/pull/141877 Forward-Port-Of: odoo/enterprise#50557