diff options
| author | Alexandre Kühn <aku@odoo.com> | 2019-08-29 14:35:18 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2019-08-29 14:50:49 +0000 |
| commit | 1d766c067d2a76efe272de0ba71ca5b23ffbf57b (patch) | |
| tree | 5b8072bfdf1bb414d78a715b0efaa3c977608628 /doc | |
| parent | d61873ac4a3ef2e30f06adbf8658d59f3be8b2dd (diff) | |
[FIX] mail: keep ratio of img in message with inline dimensions
Before this commit, when a message body contains a big image with
inline dimensions, the image was stretched.
For instance:
- `<img width="4096" height="2304">`
- on 1080p screen in the discuss app:
- max-width for image: 1542px
- image ratio: ~ 1,78
- expected height: 867.38px
- actual height: 2304px
This issue had been fixed[1], but was reintroduced[2].
Note that this fix only works when inline dimensions are set as attr
of the `<img>` tag. It won't work with dimensions attached as inline
styles (e.g. `<img style="height: 4096px; width: 2304px;>`), due to
high CSS specificity of inline styles.
[1] https://github.com/odoo/odoo/commit/e7bc4e9703954fa952f24b4f96e75dc4299bbb28
[2] https://github.com/odoo/odoo/pull/15542/commits/46699c5214229ea8aebcc04e08d0786fd2b67f35
Closes #36227
closes odoo/odoo#36243
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions
