The ServiceNow image library is the set of images that HTML fields reference by name. Users with the image_admin or content_admin role upload images from System UI > Images, one at a time or as a zip archive. Replacing a file keeps its name, and the HTML editor picker inserts library images into form content.
How library images are stored and referenced
Library images live in the Images table, which the platform records as db_image. Once an image is uploaded there, an HTML field can reference it by its name, appended to the instance address. That makes the name you choose at upload the handle that each reference uses, so settle it before the first image goes in.
Each image record carries a short set of fields:
| Field | What it does |
|---|---|
| Name | The file name used to reference the image in HTML |
| Active | When checked, the image can be referenced in HTML |
| Category | Groups the image file within the library |
| Image | Holds the file. The [Update] link loads a new version and [Delete] removes the image |
| Format, Size bytes, Height, Width | Populated automatically when the file is uploaded |
The Images list sorts by updated date, newest first.
Uploading one image at a time
Go to System UI > Images and click New. Enter the Name, select the Active check box if the image should be referenced from HTML, choose a Category, and use Click to add in the Image field to select the file. The metadata fields fill in once the upload finishes.
The upload needs the image_admin or content_admin role.
Uploading several images from a zip archive
For a batch, build a single .zip file that holds image files and nothing else. Then go to System UI > Image Zip Upload, click Choose File, select the archive, and click Upload. A message confirms the files were uploaded to the database.
Three rules govern the batch:
- Folder paths become part of the name. The path is written with underscores in place of the slashes, so a file stored as myimages/image1.gif is referenced as myimages_image1.gif. Plan the folder names with this in mind, because the flattened name is what your HTML will point to.
- Image names cannot exceed 100 characters, and that count includes the folder path. Files with longer names are rejected.
- The upload message confirms the batch ran. The system logs record which files were uploaded and which were rejected, so open the logs to check the individual results.
Accepted file types and formats that need another route
The library accepts .gif, .jpg, .png, .ico and .bmp files. One exception applies to batches: a zip archive that contains .bmp images is not supported, so keep those files out of the archive and upload them separately.
Replacing an image without changing its name
Replacing a file keeps the existing name in place, so each reference continues to work and now points to the new file. The steps are:
- Go to All > System UI > Images and click the name of the image to replace.
- In the Image field, click the [Update] link.
- Click Browse, select the new file, and click Open.
- Click OK.
The new file replaces the previous one in the instance database and is used in each location that references the file name. Check each place the image appears after you replace it. If the new image does not appear as expected, clear the browser cache. The update needs the same image_admin or content_admin role as the upload.
Restricting which file extensions the UI displays
The system property glide.ui.strict_content_types controls which file extensions the UI displays. It takes a comma-separated list of acceptable extensions. Any file whose extension is missing from the list appears broken in the UI. The example list includes ico, gif, png, jpg, jpeg, bmp, js, css, htm, html, ogg, mp3, eot, woff, woff2, svg, ttf, swf, cur and map.
That list covers scripts, stylesheets, audio and fonts as well as images, so the same list also governs scripts, stylesheets and fonts, not only images.
Creating the property needs the admin role. Enter sys_properties.list in the Navigation filter, search for the property name to confirm it does not already exist, click New, and complete the Name, Type and Value fields. The type is string.
Adding or changing a system property has a performance impact. The platform flushes its cache on each change, and that flush has a very high performance cost for one to 10 minutes. Done excessively, it can cause an outage. Property values are also stored as strings, so a true|false property returns the text ‘true’ or ‘false’ when read. A setting that changes more than once or twice a month belongs in a custom table, not in a system property.
Inserting library images into an HTML field
Images reach a page through the HTML editor on the form that holds the HTML field. Open the form, click the position where the picture should appear, and then click the insert/edit image icon on the editor toolbar. Complete the Insert/Modify image form and click OK.
The Type field has two choices, and the choice decides where the file lives:
- Image Library stores the image in the db_image table. Because it sits in the library, you can reuse it in several locations.
- Attachment is limited to the current record. Use it when the picture belongs to one specific form.
For the Image field, begin typing a file name and pick from the list, or use the reference lookup icon. To upload a new library image, click New, choose the file, and click Upload. For an attachment, choose the file and click Attach.
Two text fields look similar but do different jobs. Tooltip is the text that appears when a reader points at the picture. Alt is the accessibility text that a screen reader can use. If Alt is left blank, it falls back to the Tooltip text, so fill in Alt with a plain description of what the picture shows.
To resize an image, click it so the sizing frame appears, then drag a sizing point. The corner points keep the proportions fixed. Depending on the browser, you may need to highlight the image before the frame appears. The advanced options control layout: alignment (the default is Baseline), border thickness, horizontal and vertical spacing in pixels, and width and height in pixels.
Pasted images are saved in the system as attachments, not as library images. To change a pasted image, save the entry, select the image, click the insert/edit icon, and complete the form. If you want a picture to be reusable, upload it to the library first and choose it through the Image Library type.
The role needed for this is the one that allows updating the record containing the HTML field. For example, any user with a role can create a knowledge article and embed an image in it. Managing the library itself stays with the image_admin role.
Choosing between the library and an attachment
Put a picture in the library when it is reused in several places, because one upload serves each place that references its name. A screenshot that explains a step on one record fits better as an attachment, because it stays with that record.
Storage is the main difference to weigh. Library images are saved in the db_image table, which is a public table with no security restrictions, and unauthenticated users have full access to images uploaded there. An attachment is saved in the Attachments table, sys_attachment, and lets you keep an image tied to a record. Uploading as an attachment also stops users from reaching the image by appending its name to the instance address.
Attachment size is governed separately. The attachment limit is set by the com.glide.attachment.max_size system property. The property has no default value set, the documented fallback is 1024, and the platform advises a value of 1024 or less.
Turning off library access in the HTML area
By default, users can use and upload images from the image library inside an HTML field. Administrators with the admin role can turn that off for the HTML area editor. The change applies to the HTML area editor and does not change TinyMCE.
Go to All > System UI > UI Pages and open html_insert_image_dialog. Comment out the block that reads the db_image table and the block that sets the Image Library option in the picker, then click Update. To remove the Upload from URL option in the HTML editor, add a property named glide.ui.html.image.allow_url and set its value to false.
Frequently asked questions
Who can upload images to the library?
Users with the image_admin or content_admin role can upload images through System UI > Images. Users who edit records with HTML fields need the role that allows updating those records, which is a separate permission from the upload role.
Why was a file in my zip archive rejected?
The usual causes are a .bmp image inside the archive, which is not supported, or a file name, including its folder path, longer than 100 characters. Open the system logs after the upload. They show whether each file was uploaded or rejected.
Why does a replaced image still show the old version?
The new file replaces the old one in the instance database, and each reference keeps the same name. Clear the browser cache and reload the page if the new image does not appear.
Why does a file appear broken in the UI?
Its extension is missing from the glide.ui.strict_content_types property. Add the extension to the comma-separated value and the UI displays the file.
Can people reach library images without signing in?
Yes. The db_image table is public and has no security restrictions, and unauthenticated users have full access to the images in it. For an image that should stay tied to a record, upload it as an attachment instead.