June 24, 2018 by Andreas Wik
In case you haven’t heard already – Unsplash is the place to go when you need royalty free photos to use in your projects, whether it’s for commercial use or not. I use it myself quite often, for large background images. So does https://pixelarity.com, just to name an example.
While they do have a great API for developers, they also give you the option to simply access random images via URL’s.
Here’s an example, generating a completely random image from their massive storage:
We can also generate a random image from a specific user. The URL format would be like so:
Click this link below to generate a random image from the user wsanter:
There’s also an option to set the size of the image you want generated. Like so:
Let’s generate a random image with the width and height of 300px:
This one is really cool. You can generate images from search terms. Let’s search for city and night (so fkn creative):
You place the search terms at the end of the URL, so before you could add the size if you’d like:
For a full list of features – check out the Unsplash Source documentation.