How to add a image in layout field in Email layout

Community Alums
Not applicable

I need to add the image HeaderNotificationAzul.png into layout field. How can I do that?

 

LucasRodriguesF_0-1704814245326.png

 

2 REPLIES 2

Community Alums
Not applicable

Hi @Community Alums ,

We need to use the code directly in the Message HTML field instead of using in the Notification scripts.
We need to make sure we are giving the complete URL of the image in the code

Sample code to add the attribute in the HTML field

<Style> body {background-image:URL('https://<instancename>.servicenow.com/imagename.jpg');} </Style>

This will help reflecting the background image for the Notification and can be seen in Preview and in Email clients as well.

 

Also, you can follow :https://docs.servicenow.com/bundle/vancouver-platform-administration/page/use/using-forms/task/t_EmbeddingImagesInHTMLFields.html

 

DpkSharma
Giga Expert

Hi @Community Alums 

To add an image in the layout field of an Email layout in ServiceNow, you can follow the steps below:

  1. Create or edit an Email layout record in ServiceNow.
  2. In the layout field, you can use HTML code to add an image. You can use the <img> tag to insert the image.
  3. Specify the source of the image using the src attribute of the <img> tag. The source can be a URL or a reference to an attachment in ServiceNow.
  4. Save the Email layout record.

Here is an example of how to add an image in the layout field of an Email layout:

 

 

<img src="https://example.com/image.jpg" alt="Image Description">