Portal task avatars no longer embedded as base64
/my/tasks served avatars as base64, which could be several MB and could not be cached. It now uses /web/image URLs with an access token.
/my/tasks served avatars as base64, which could be several MB and could not be cached. It now uses /web/image URLs with an access token.
| Branch | Pull request | Commit |
|---|---|---|
| 20.0 | odoo/odoo#296737 ↗ | 5dc4d5d59f ↗ |
[PERF] project: don't embed base64 images In `/my/tasks` route, tasks assignee avatar image is embeded in the html as base64. Several problems: - it can weigh a lot (several MB) - it cannot be cached by browsers - if the assingee apprears multiple time, the image is duplicated Now we use `/web/image/...` URL - with an access token to ensure the portal user can read the avatar - with a `unique` query param to let browsers cache the image. I tried it on a odoo.com staging, with a random partner list of tasks. - before: 4.6MB transferred over network, resource size: 6.2MB - after: 29kB transferred over network, resource size: 239kB and images are cached after they are loaded once. This is stable-friendly: existing databases continue with the old template which still works. New databases gets the new optimized template. task-6670541