Skip to content

Outlook image dimensions

edited April 2022 in Contributions

Here is a modified /js/create/editor.php to output img width, height and align attributes instead of inline style for Outlook compatibility.
https://gist.github.com/petersjoo/e1049f2f543895520e36acca3a3f787f

Comments

  • Hi, psjoo - this looks good.

    A question on this: not having access to Outlook, is there a way to view what it looks like on the (desktop) platform?

    I'm sending width/height but some of my images show the top 15px or so, and don't show anything else. I don't quite understand why that is - possibly a line-height thing.

  • Is there a solution? I have the same problem! 😖

  • This is brilliant!

    I asked Ben about the issue with Sendy changing the image tag to style which Outlook ignores and he said sendy didn't do that...

    I'm working on an image Gallery, any idea how I would pass a selected image into the create.php page?

  • jamescridland, I can't figure out why your images appear small without looking at the rest of your code, possibly it's a surrounding container without a width or something like that.
    Desktop Outlook has always been a pain, and even more so since they changed html rendering engine from IE to Word. Of course there is paid alternatives like Litmus and others, but the only way I have found reliable is testing (and testing and testing...) in the native app.

    Grafitec; Gallery from uploaded images to insert in the editor? Are you writing it as a CKedtior plugin? In that case I think you can find it in the developer docs. But, many has done this before so you can save time if you find a plugin that works for you. https://ckeditor.com/cke4/addons/plugins/

  • Hi again psjoo,

    No, I already have a gallery application which allows gallery creation and image upload. I want to a select button on each image that the client can choose and then it will revert back to the create.php page and insert the image, a bit like the current image upload modal does.

  • There’s a very useful tool for viewing what it looks like on outlook

    https://www.litmus.com/

    Expensive but you can get free trial and figure out what works and how it looks. Especially interesting that it can look ok on outlook mac but not on outlook windows for me.

This discussion has been closed.