I have got two mailings. I created a workflow which requests JSON product recommendations to Target. Then I put urls/product name, price etc. into html.
HTML is like this. If I add bold element then the product pictures does not work:
<div style="text-align: center; padding-bottom: 20px;">
<img src="https://demo-system-next.s3.amazonaws.com/assets/luma/banners/AdobeStock_570499457.jpg" alt="Banner Image" style="width: 100%; border-radius: 8px;">
</div>
<div>
Check-out the products which you might like
</div>
<div style="width: 100%; max-width: 600px; margin: 0 auto; text-align: center;">
<div style="display: flex; justify-content: space-between;">
<div style="width: 32%; padding: 10px; box-sizing: border-box;">
<img src=<%= variables.x1 %> alt="Column 1" style="max-width: 100%; height: auto;">
<p><%= variables.x2 %></p>
</div>
<div style="width: 32%; padding: 10px; box-sizing: border-box;">
<img src=<%= variables.x4 %> alt="Column 2" style="max-width: 100%; height: auto;">
<p><%= variables.x5 %></p>
</div>
<div style="width: 32%; padding: 10px; box-sizing: border-box;">
<img src=<%= variables.x7 %> alt="Column 3" style="max-width: 100%; height: auto;"> </img>
<p><%= variables.x8 %></p>
</div>
</div>
</div>
Do you you have any ideas why is that? How to debug this?
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Michael_Soprano ,
Here is mine observation and some suggestions for your issue:
Potential Issues and Debugging:
Suggestions:
<h2 style="margin: 0; padding: 10px 0; text-align: center;">
Check-out the products which you might like
</h2>
<div style="font-size: 24px; font-weight: bold; margin-bottom: 20px; text-align: center;">
Check-out the products which you might like
</div>
These steps should help you identify and resolve the issue with the images not loading when using a header.
Best regards,
MEIT MEDIA (https://www.meitmedia.com)
Contact Us: infomeitmedia@gmail.com
Thank you very much for you extensive response.
It seems like that it does not work with any addidional div with text. I also tried tr / td structure and it also did not work.
If I add here whatever div with text it does not work:
<body>
<div style="text-align: center; padding-bottom: 20px;">
<img src="https://demo-system-next.s3.amazonaws.com/assets/luma/banners/AdobeStock_570499457.jpg" alt="Banner Image" style="width: 100%; border-radius: 8px;">
</div>
<div style="width: 100%; max-width: 600px; margin: 0 auto; text-align: center;">
<div style="display: flex; justify-content: space-between;">
<div style="width: 32%; padding: 10px; box-sizing: border-box;">
<img src=<%= variables.x1 %> alt="Column 1" style="max-width: 100%; height: auto;">
<p><%= variables.x2 %></p>
</div>
<div style="width: 32%; padding: 10px; box-sizing: border-box;">
<img src=<%= variables.x4 %> alt="Column 2" style="max-width: 100%; height: auto;">
<p><%= variables.x5 %></p>
</div>
<div style="width: 32%; padding: 10px; box-sizing: border-box;">
<img src=<%= variables.x7 %> alt="Column 3" style="max-width: 100%; height: auto;">
<p><%= variables.x8 %></p>
</div>
</div>
</div>
</body>
Views
Replies
Total Likes
Hi @Michael_Soprano ,
Outlook has limited support for CSS, especially when it comes to styling within <div> tags. This could definitely be contributing to the image rendering issues you're experiencing.
Steps to Resolve Image Rendering Issues:
Here's a simplified version using a table-based layout and inline styles you can try to test:
<body>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse; text-align: center;">
<tr>
<td colspan="3" style="padding-bottom: 20px;">
<img src="https://demo-system-next.s3.amazonaws.com/assets/luma/banners/AdobeStock_570499457.jpg" alt="Banner Image" style="width: 100%; border-radius: 8px;">
</td>
</tr>
<tr>
<td width="33%" style="padding: 10px; text-align: center;">
<img src="<%= variables.x1 %>" alt="Column 1" style="width: 100%; height: auto;">
<p><%= variables.x2 %></p>
</td>
<td width="33%" style="padding: 10px; text-align: center;">
<img src="<%= variables.x4 %>" alt="Column 2" style="width: 100%; height: auto;">
<p><%= variables.x5 %></p>
</td>
<td width="33%" style="padding: 10px; text-align: center;">
<img src="<%= variables.x7 %>" alt="Column 3" style="width: 100%; height: auto;">
<p><%= variables.x8 %></p>
</td>
</tr>
</table>
</body>
This approach should address the issues related to both display: flex; and <div> styling in Outlook.
Best regards,
MEIT MEDIA (https://www.meitmedia.com)
Contact Us: infomeitmedia@gmail.com
Unfortunately still the same problem for the code which you recommend. I am using gmail not outlook
Views
Replies
Total Likes
Hi @Michael_Soprano ,
Thank you for clarifying that you're facing this issue in Gmail. Gmail is generally more flexible with CSS compared to other email clients like Outlook, so it should be easier to narrow down the problem and fix the issue.
Try the following diagnostic steps:
Temporarily replace the src="<%= variables.x %>" in the image tag with a static image URL (e.g., src="https://your.image.url") to see if the image loads correctly. This is can help to narrow down if the variable causing image rendering issue.
This combined approach should help you effectively diagnose and narrow down the root cause of the problem.
Best regards,
MEIT MEDIA (https://www.meitmedia.com)
Contact Us: infomeitmedia@gmail.com
First and foremost thanks for you time!
Send to private email. Opened on another computer. Did not help.
I send this to your email
Temporarily replace the src="<%= variables.x %>" in the image tag with a static image URL (e.g., src="https://your.image.url") to see if the image loads correctly. This is can help to narrow down if the variable causing image rendering issue.
Send you 2 emails. First one is without "" and the second one is with "". The second with "" now worked. To not waste your time I promise that I have tested this multiple times and consult internally and before it did not work
Strange thing but on mobile device with mobile data:
- the one with "" on img variables WORKED
- the one without "" on img did not worked
When it did not work it changes the url:
Hi @Michael_Soprano ,
We've received your email, let me spent some time on it and soon I'll get back to you with my analysis.
Best regards,
MEIT MEDIA (https://www.meitmedia.com)
Contact Us: infomeitmedia@gmail.com