What allows for ?t=small to resize images?

Vegard S
Mega 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.

6 REPLIES 6

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

Hi Kieran, yes it was testing on the same field and table. It seems it happens on certain images, but not others. Most likely there's some issue with the metadata of those images is my assumption. Even though they were standard png. They still display, but they don't generate thumbnails. 

So what I did with those images is that I took a screenshot of them and uploaded the screenshot, that worked.