artsy/artsy-backbone-mixins — pull request #21 by joeyAghion (2014-07-02 20:01:37+00:00)
Title: @craigspaeth: choose best imageUrl from among selected versions

We frequently use `imageUrl` polymorphically, such that some instances of an object may have one set of versions available while others have a different set. This helper generates a URL with the first available version from the provided list, or `missingImageUrl` otherwise.

If you'd prefer this can go into the models that encounter this problem. I just thought it might be useful elsewhere.