Generate Random Images From Unsplash Without Using The API
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:
https://source.unsplash.com/random
https://source.unsplash.com/random
Specific User
We can also generate a random image from a specific user. The URL format would be like so:
https://source.unsplash.com/user/USERNAME
Click this link below to generate a random image from the user wsanter:
https://source.unsplash.com/user/wsanter
Random Image From Search Term
This one is really cool. You can generate images from search terms. Let’s search for city and night (so fkn creative):
https://source.unsplash.com/random/?bamboo,forest
https://source.unsplash.com/random/?bamboo,forest
You place the search terms at the end of the URL, so before you could add the size if you’d like:
https://source.unsplash.com/random/3840×2160/?bamboo,forest