Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Images inside Notification

gcarot
Kilo Contributor

Hi, I need your help to solve a problem: I have a record with an Image field inside.

1.PNG

After submit this record, start a Notification. Inside the Notification,

there is a Script that get the Image from the Record.

When I try to display the image inside the Html code, does dot work when the email is sent, also show "blank" image (no image).

(the image is stored in sys_attachment).

Possible Solutions:

- Move the image from sys_Attachment to db_image? (because using images from db_images, the notification works)

- Use the sys_Attachment record and display inside the Html notification?

-Upload the image directly to db_image?

Thanks

3 REPLIES 3

Brad Tilton
ServiceNow Employee

I've always used the db image table for images in email links. I think the problem with using a field on a table is that it would have to be available publicly to show up in the email.


Hi Brad,


how can I upload Image in db_image (script way)?


Because I tried without success 😞


Thanks


GaetanoD
ServiceNow Employee

Hi Guido,



see sys_attachment_doc table and work with base64.


Use base64 on src attribute of img tag in html. You can resolve your problem.



Regards,