DEV Community

Discussion on: Using the Unsplash API to Display Random Images

Collapse
 
bradleycollins profile image
Bradley Collins

Nice! I just used Lorem Picsum for a quick mess around pen I did but I like the idea of using Unsplash API for learning, going to have to give it a try.

Collapse
 
desi profile image
Desi

Unsplash's is basically the same, looks like, I just really wanted beachy photos!

Came up with an idea with co-workers the other day to build a custom lorem picsum similar to fillmurray.com/ but featuring someone else. Maybe someday I'll find the time!

Collapse
 
bradleycollins profile image
Bradley Collins

My only issue with Picsum is that it pulls the same image in each place I am using it. I was hoping it would display a random one each time :(

fillmurray is great, never seen it before, makes me want to do the same! I think my favorite part of the site though is that they use the Crazy Nic Cage pic for the favicon!

Thread Thread
 
nijikokun profile image
Nijiko Yonskai

Co-creator of picsum.photos here! 👋

You can actually have the image change by appending a cache-busting query string to the end:

<img src="https://picsum.photos/200/300?a" />
Enter fullscreen mode Exit fullscreen mode

Here is a demonstration!

Thread Thread
 
bradleycollins profile image
Bradley Collins

Oh dang, nice! Thanks for the heads up!