Issue
I have an API with the endpoints:
api/image/1
Returns me the image 1api/image/random
Gives me a random image
Whenever I make a call for a random image, like 5 times on one web page, each time it's the same image. It's a little bit like https://picsum.photos/seed/picsum/200/300...
I would like to have a random image, each time. Even if I call for a random image 10 times on one web page. Is there a way that this is possible?
Solution
As stated in this github issue, you can basically use https://source.unsplash.com/random/200x200?sig=incrementingIdentifier
.
<img src="https://source.unsplash.com/random/200x200?sig=1" />
<img src="https://source.unsplash.com/random/200x200?sig=2" />
<img src="https://source.unsplash.com/random/200x200?sig=3" />
Answered By - kissu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.