Skip to main content
Guideline: Hotlinking Images
Luke Chesser avatar
Written by Luke Chesser
Updated over 2 years ago

From the API Guidelines:

All API uses must use the hotlinked image URLs returned by the API under the photo.urls  properties. This applies to all uses of the image and not just search results.

Downloads and views are one of the main motivations for many Unsplash contributors. By opening up the Unsplash API to 3rd party applications their photography is seen and used by more creators which inspires them to contribute more, new contributors to join, and an even better library for you and your community of creatives.

When displaying Unsplash images, you should use the urls property returned by the API on all of the API photo objects.

{
  "id": "LBI7cgq3pbM",
  "width": 5245,
  "height": 3497,
  "color": "#60544D",
  "urls": {
    "raw": "https://images.unsplash.com/example.jpg?ixid=123123123",
    "full": "https://images.unsplash.com/example.jpg?q=75&fm=jpg&ixid=123123123",
    "regular": "https://images.unsplash.com/example.jpg?q=75&fm=jpg&w=1080&fit=max&?ixid=123123123",
    "small": "https://images.unsplash.com/example.jpg?q=75&fm=jpg&w=400&fit=max&&ixid=123123123",
    "thumb": "https://images.unsplash.com/example.jpg?q=75&fm=jpg&w=200&fit=max&ixid=123123123"
  },
  "user": { ... },
  "links": { ... }
}

Many endpoints also support returning a custom size for the photo urls , so if one of the predefined sizes doesn’t work for your application you can pass a custom width and be returned a urls.custom field with the dynamically resized image.

Note that this applies to all uses of the image and not just search results. For example, in Trello when a user selects an image to use as their board’s background, the image is hotlinked so that all views of that image in the future will count towards the photographer’s photo views.

If the image is remixed to create a derivative creative image, these results do not need to be hotlinked, as they are no longer the exact source image and can’t be hosted from the original infrastructure.

For companies that need to use their own image infrastructure to host the images, contact our API team for a potential photo views beacon alternative.

Did this answer your question?