[FIX] mail: prevent from stretching small image attachment

task-2447939

closes odoo/odoo#65120

X-original-commit: 65ca2b2cc2fdd56e1734ee8357803e7232294495
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Sébastien Theys
2021-01-27 11:07:41 +00:00
parent 6df75c0733
commit a64946a70c
@@ -95,7 +95,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;`;
}
//--------------------------------------------------------------------------