Thumbnail images returned by the API

Hello,

I have recently been working with some custom fields that are of the Simple Photo type. I noticed that the response contains many thumbnails of different sizes like so:

c_poster: {
  url: "https://a.mktgcdn.com/p- 
 sandbox/lkxZxQ6pyzyZQ4eYXM0y2WWKAJdA8DPhXL0MBgGK3tw/2000x2800.jpg",
  width: 2000,
  height: 2800,
  sourceUrl: "https://a.mktgcdn.com/p-sandbox/ZTBTvyHQ2yaVHhSN1PpbE310oKKdVgzjNSc_lnCct2w/2000x3000.jpg",
  thumbnails: [
    {
       url: "https://a.mktgcdn.com/p- 
       sandbox/lkxZxQ6pyzyZQ4eYXM0y2WWKAJdA8DPhXL0MBgGK3tw/2000x2800.jpg",
       width: 2000,
       height: 2800
    },
   {
      url: "https://a.mktgcdn.com/p-sandbox/lkxZxQ6pyzyZQ4eYXM0y2WWKAJdA8DPhXL0MBgGK3tw/1357x1900.jpg",
      width: 1357,
      height: 1900
    },
    {
       url: "https://a.mktgcdn.com/p-sandbox/lkxZxQ6pyzyZQ4eYXM0y2WWKAJdA8DPhXL0MBgGK3tw/619x867.jpg",
     width: 619,
     height: 867
    },
    {
     url: "https://a.mktgcdn.com/p-sandbox/lkxZxQ6pyzyZQ4eYXM0y2WWKAJdA8DPhXL0MBgGK3tw/321x450.jpg",
     width: 321,
     height: 450
    },
    {
     url: "https://a.mktgcdn.com/p-sandbox/lkxZxQ6pyzyZQ4eYXM0y2WWKAJdA8DPhXL0MBgGK3tw/196x274.jpg",
     width: 196,
     height: 274
    }
  ]
}

I was curious as to what determines the number of thumbnails that are returned and their sizes.

For my use case, I have been using the smallest image in the list which seems to always be the last one. Is that always the case?

Thanks!

Hi Aaron,

I recommend taking a look at this guide that explains how to work with thumbnails - Serving Photos | Hitchhikers.

Let me know if that helps or if you have any additional questions from there!