Roundcube Community Forum

Release Support => Release Discussion => Topic started by: lacosta on January 26, 2017, 02:44:03 AM

Title: [solved] Img size in html msg. body
Post by: lacosta on January 26, 2017, 02:44:03 AM
Hi, where i can add option max-width: 100% to img style ? This code is generated by php, this is not in css. Most of phone app client add picture to html body not as attachment. Problem is size of pictures, when 2K and more res. is over preview container.

Code: [Select]
<div class="rcmBody">
 <div>
    <img style="width: auto; height: auto;" alt="Image" src="./?_task=mail&amp;_action=get&amp;_mbox=INBOX&amp;_uid=xxxxxxx&amp;_token=xxxxxxxxxxxxxxxxxx&amp;_part=2&amp;_embed=1&amp;_mimeclass=image">

Solution is :

Code: [Select]
<div class="rcmBody">
 <div>
    <img style="width: auto; height: auto; max-width: 100%;" alt="Image" src="./?_task=mail&amp;_action=get&amp;_mbox=INBOX&amp;_uid=xxxxxxx&amp;_token=xxxxxxxxxxxxxxxxxx&amp;_part=2&amp;_embed=1&amp;_mimeclass=image">
Title: Re: Img size in html msg. body
Post by: SKaero on January 26, 2017, 09:20:43 AM
I think that html would be part of the email message not part of the Roundcube code. The bast way to add a max-width would be to add a css file with the following:
Code: [Select]
.rcmBody img {
max-width: 100%;
}
Title: Re: Img size in html msg. body
Post by: lacosta on January 26, 2017, 04:36:55 PM
It works ! Thank you ...