htmlimagerandomrequest

Generate random image by url


I have an API with the endpoints:

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

  • I used to recommend source.unsplash.com but Unsplash is doing some shenanigans with this legacy project and overall deprecate it, on top of it being constantly up and down.

    I recommend using something else that does the job just as well.

    <img src="https://loremflickr.com/200/200?random=1" />
    <img src="https://loremflickr.com/200/200?random=2" />
    <img src="https://loremflickr.com/200/200?random=3" />