1

My E-mail with image module shows blank instead of the four images sent using substitution tag via dynamic templates. URLs are present in Original Message (Gmail), but images are not rendered.

What I've tried: I've read & tried solutions provided in Can I have an image with a substitution tag in a SendGrid template?, but they do not show the images.

To troubleshoot my problem - I've placed the same substitution tag under text & image modules. Text module for {{images}} shows full URLs, and they do link me to the correct image upon clicking. However, the same {{images}} with exact URLs do not appear in my image module.

My image module HTML is as follows:

<td style="font-size:6px; line-height:10px; padding:0px 0px 0px 0px;" valign="top" align="center"><img class="max-width" border="0" style="display:block; color:#000000; text-decoration:none; font-family:Helvetica, arial, sans-serif; font-size:16px; max-width:100% !important; width:100%; height:auto !important;" width="600" alt="" data-proportionally-constrained="true" data-responsive="true" src="{{images}}"></td>

SendGrid Image for Reference

Original Message from Gmail

1 Answers1

0

For it works, the next way:

But is only 1 image:

Example Template Sendgrid:

I called my variable as InsurerLogo that is my path url

enter image description here

Template JSON test empty

enter image description here

Now in the back only assign the url to variable InsurerLogo

enter image description here

Finally I make the test, and it works for me:

enter image description here

image from internet as an example: https://learn.g2.com/hubfs/iStock-1054858914.jpg

But remember in my case is only one image, if you want display many images I think that you can use the "each" of sendgrid or similar something to iterate the array of images using the path url: https://docs.sendgrid.com/for-developers/sending-email/using-handlebars#iterations

I hope it worked for you!

Jonathan G
  • 119
  • 3
  • Thank you for your time & reply, Jonathan. You are right - the issue is in handling the array of images. I haven't found a solution to it yet, and I'm still studying the link you've provided. For now, I've referenced the images individually, as you have, as I've had no problems when passing a single variable through SendGrid. – TurnItOffAndOnAgain Mar 07 '23 at 05:19