When developing the design of website pages with photographs from the user, I use random images from the Unsplash service. They have an official, but deprecated service, which was replaced by a fresh API. However, I continue to use the old service — and here's why.
Unsplash Source does not require registration. You can use a link to the image without any keys in any place where you could indicate it. It also has a clear photo request interface, which I’ll talk about below.
For example, here is a
Both pictures above were chosen randomly by the Unsplash servers.
Reload the page and you will see that the pictures have changed, but remain relevant to the theme.
What does deprecated mean
The service is considered obsolete and continues to operate. This is what it says on the official website.
I couldn’t find any official documentation for it, but I did find a detailed answer on Reddit from a representative of the Unsplash team. I will describe this already structured answer in the article.
The only limitation that currently exists for Unsplash Source is that the reply uses photos that were published before the service became obsolete.
Requesting a random image.
Image from the all featured list.
Or from specific user.
Additionally, you can specify the final image size. To do this, indicate resolution at the end of the address.
You can narrow the selection of random images to specific topics by specifying keywords separated by a comma after the question mark in the address. Isn't that cool?
Daily or weekly update
All of the above queries return a new image every time, provided that there is a large range of photos to choose from due to filters. But there are keys for limiting the frequency of changing photos on request:
Add them at the end of the address to clarify how often this image by your criteria is changed.
Multiple images with the same address problem
I encountered a problem with displaying several images on a page at the same address - they appeared the same.
But if you add the addresses
?2, and so on at the end of the line, the server will perceive these as different addresses and return different pictures.