>>! In T66214#2105088, @brion wrote:
> Quick note from IRC regarding the thumb-URL needs for mobile apps/web:

Thanks for this — and judging from the response, I'm glad I asked :)

> The primary use case for mobile apps/web here is loading an appropriately-sized thumbnail of a given image as quickly as possible. Currently this requires either an extra HTTPS round-trip for the 'imageinfo' API, or rewriting the existing thumb URLs on the client and then working around the various edge cases (having to know that .svg thumbnails to .svg.png; handling failure cases when asking for a too-big size, knowing that very long filenames in thumbnail paths are sometimes rewritten to fit a length limit, etc). A cleaner, more consistent URL-based API will allow leaving the formatting and sizing questions to the server end.

This isn't currently possible with the existing tech and without some rearchitecturing, so it's not just a matter of URL rewriting in VCL as has been already proposed. (upload.wikimedia.org traffic is directed directly to Swift, which knows nothing about the possible thumbnail sizes)

> Secondary use case: local caching of those images is simplified if the caching properties of those thumbnail URLs are more predictable.

Could you elaborate on that? Are you talking about content-hashed or other versioned URLs that always point to the same version of the image and can be locally cached or do you mean something else by predictable?

> Tertiary use case: there's a lot of use on mobile of squared-off images in lists/menus, and specially-cropped 'hero' images on articles. Having a cleaner thumb URL API should make it easier to extend it to move more of that cropping to the server-side, simplifying client code and reducing the amount of data transferred over mobile networks by pre-cropping unseen edges before download.

*Nod*, I remember hearing about this use case before. It doesn't seem to have been thought of in the existing strawman proposal so far and I agree that it's definitely something that we should keep in mind when talking about a "thumb API".