diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2018-02-23 12:29:25 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim-odoo@users.noreply.github.com> | 2018-02-26 08:24:08 +0100 |
| commit | e2c2a2fc696a12d3fdd697e5da5354437a290047 (patch) | |
| tree | 4a8277d11f9a22c1ce9058e4beee7278ec388ef4 /addons/mail/static/src/less/composer.less | |
| parent | a16013be6636db58a4252fafd67033c6643a1e48 (diff) | |
[FIX] mail: rotate image in preview
When uploading an image as attachment, the document viewer doesn't
support the EXIF data. Therefore, a picture taken with a non-zero angle
will not appear with the right orientation (preview or full-size image).
Unfortunately, supporting EXIF data is not trivial in Python or
JavaScript without external libraries. Therefore, we add a rotate button
which allows the user to rotate the image by 90°. Moreover, we add the
`image-orientation: from-image` CSS property, which is only supported by
Firefox.
opw-1814407
Diffstat (limited to 'addons/mail/static/src/less/composer.less')
| -rw-r--r-- | addons/mail/static/src/less/composer.less | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/mail/static/src/less/composer.less b/addons/mail/static/src/less/composer.less index ec3b156af2a..a7ca9fb9787 100644 --- a/addons/mail/static/src/less/composer.less +++ b/addons/mail/static/src/less/composer.less @@ -269,6 +269,7 @@ img { width: @o-mail-attachment-image-size; height: @o-mail-attachment-image-size; + image-orientation: from-image; // Only supported in Firefox } .o_image_overlay{ display: none; @@ -370,6 +371,9 @@ .o-flex-display(); justify-content: center; align-items: center; + img { + image-orientation: from-image; // Only supported in Firefox + } img, video { max-width: 100%; max-height: 100%; |
