diff options
| author | Sébastien Theys <seb@odoo.com> | 2021-01-26 15:56:53 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2021-01-26 15:56:53 +0000 |
| commit | 65ca2b2cc2fdd56e1734ee8357803e7232294495 (patch) | |
| tree | 1ebc416392a0719fa5dec470bc289d26ee9fe0fc | |
| parent | 27d251a17f3ccc597e2cd277b6d40a31dc9889b2 (diff) | |
[FIX] mail: prevent from stretching small image attachment
task-2447939
closes odoo/odoo#65074
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
| -rw-r--r-- | addons/mail/static/src/components/attachment/attachment.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/mail/static/src/components/attachment/attachment.js b/addons/mail/static/src/components/attachment/attachment.js index 9cdb08540cc..a1c05fb8c62 100644 --- a/addons/mail/static/src/components/attachment/attachment.js +++ b/addons/mail/static/src/components/attachment/attachment.js @@ -96,7 +96,8 @@ class Attachment extends Component { } else { size = '160x160'; } - return `background-image:url(/web/image/${this.attachment.id}/${size}/?crop=true);`; + // background-size set to override value from `o_image` which makes small image stretched + return `background-image:url(/web/image/${this.attachment.id}/${size}/?crop=true); background-size: auto;`; } //-------------------------------------------------------------------------- |
