Unsplash uses Imgix to serve its images, which means you can transform the images before downloading.
Unsplash is an amazing image service! They provide high-quality images for free from talented photographers located all over the world.
Something I found years ago that I've loved is that Unsplash uses Imgix to serve, transform, and optimize their images.
This means that to use an Unsplash image, you don't technically have to download it. But you can grab the URL, add your transformation parameters, and get the image you want.
Say I search for mountains
and end up seeing an image I love in the results.
Instead of downloading. I can copy the image URL.
This would give me something like this:
https://images.unsplash.com/photo-1519681393784-d120267933ba?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80
You can see that the parameters in the URL can be manipulated. I could change this to be a square by changing the URL to:
https://images.unsplash.com/photo-1519681393784-d120267933ba?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=600&h=600
Which would give me this image:
And thus, we have the power of Imgix's transformations applied to the vast library of Unsplash images.
ixid
ParameterThe one thing you must do to adhere to the Unsplash guidelines is to keep the ixid
parameter included in every image URL.