Roundcube Community Forum

 

[solved] Img size in html msg. body

Started by lacosta, January 26, 2017, 02:44:03 AM

Previous topic - Next topic

lacosta

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.

<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 :

<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">


SKaero

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:

.rcmBody img {
max-width: 100%;
}

lacosta