The CreatorCon Call for Content is officially open! Get started here.

Image broken in notification template but not in notification

BurtCrepeault
Tera Contributor

Hi everyone,

 

I've been having this situation for a few days now.

 

In our Test environment, some email notifications templates don't show an embedded image.

2024-07-05 12_10_00-HR Comment - External _ Notification _ ServiceNow.png

The image is stored in the db_image table, and referred to in the notification like this:

 

<p><span style="font-size: 12pt;"><img src="Bandeau%20CSRH.png" width="870" height="170" /></span></p>

 

  In the db_image record, we have this exact same reference:

2024-07-05 12_17_19-Bandeau CSRH.png _ Images _ ServiceNow.png

There are two things about this:

  • Notifications sent from the Test environment work fine in Outlook, although the URL looks different in the message source, which makes me think this might be cached somewhere and therefore short-lived

2024-07-05 12_24_56-DSRH0001001 - Test - Message (HTML).png

 

<img src="cid:Bandeau20CSRH.png@SNC.8de122687ca859e" alt="" width="870" height="170">

 

  • It works perfectly well in templates in Dev and Prod, this is unique to our Test environment

2024-07-05 12_26_59-HR Comment - Internal _ Notification _ ServiceNow.png

What could prevent a static image from being available from an instance?

 

I've checked in Test:

  • Active = true
  • ACLs on db_image (same across environments)
  • https://[my-instance]/Bandeau%20CSRH.png
    • Not working in Test, but Ok elsewhere
    • Exact message is: Sorry, an error occurred or this page isn't available.
  • Updating the image file by re-uploading it in Test, no effect
    • Even tried a different image, just for fun, but no fun
6 REPLIES 6

Clarice Ara_ez
Tera Contributor

Hi @BurtCrepeault I have similar issue in our Prod instance. Did you find a solution to this? Thank you so much!

Hi Clarice,

 

That was a while ago, but it was indeed solved. If I remember right, it had to do with the way you link the image in your notification, using one of two methods:

1. Use the image button in the notification and select one from the library (not reliable)

2. Find the image in the media library first (All > System UI > Images), copy its link, then edit your notification's HTML source code to include a link to the image

BurtCrepeault_0-1752785001418.png

BurtCrepeault_1-1752785214915.png

 

Method 2 was the one that worked best. If the image is not in the library, you can simply add it first.