Jump to content

Get Thumbnail Url


Paidi28

Recommended Posts

  • 2 months later...

Thank you for raising this again, we haven't got it yet but I will make sure we have a ticket to add a documented method of getting it.

Meanwhile you have to resort to some nasty hacking. Given a task with a thumbnail url that you want to use:

# Get the server location where our thumbnail exists.
server_location = s.query('Location where name is "ftrack.server"').one()

# Get the download URL to the thumbnail image.
download_url = server_location.get_url(task['thumbnail'])

# Change url from download to getting the image as a thumbnail,
# and scale the thumbnail to fit within in 100X100 pixels.
thumbnail_url = download_url.replace('/get', '/thumbnail') + '&size=100'

# The thumbnail_url can now be used to get the image. It contains your
# api key credentials necessary to get the thumbnail.
...

 

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...