tumblr / docs

Tumblr's public platform documentation.
Apache License 2.0
108 stars 26 forks source link

media object ordering #62

Closed Yay295 closed 2 years ago

Yay295 commented 2 years ago

Sometimes a media object array has multiple items in it. They seem to be ordered from largest to smallest, but the docs don't specify that this is always the case. Are media objects always ordered from largest to smallest?

cyle commented 2 years ago

Hello @Yay295 -- typically yes, they're ordered from largest to smallest. But as you noted, we don't specify as such in the docs, mainly because it depends on what your definition of "largest" is. Some ultrawide panorama images, for example, are wider than the next size class, but shorter than one of the subsequent "square" versions (used in some cases). We could clarify the docs by saying that we'll always provide them in order of descending width, but not necessarily descending height, if that helps.

cyle commented 2 years ago

Updated the docs with this info! https://github.com/tumblr/docs/blob/master/npf-spec.md#content-block-type-image