Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

What allows for ?t=small to resize images?

Vegard S
Kilo Sage

So I've come across several places where we load images by sys-id?t=small, medium and large to load a different sizes of the image. 

But I can't figure out why it only works sometimes and not all of the times. 
I can't find any attribute on the image field that allows for this and I can't find any information on it either.

5 REPLIES 5

Kieran Anson
Kilo Patron

Hi,

When you say it only works sometimes, is this testing on the same field type and table?

 

I've just been testing, and can consistently upload a photo into a live_profile photo field, and request small, medium, and large attachment sizes.

 

The first request of these image sizes takes longer, as SN is generating the compressed image. The result is observable in the sys_attachment table as the original image has a new entry in the format

  • File name: 'thumb_' + <sys_id of image attachment record> + '_' + <new dimensions for relative sizing>
  • Table name: sys_attachment
  • Table Sys ID: pointing to sys_id of original file