Download Deleted Photos from Unsplash in Original Quality

3 min read

Backstory

I was making a banner for the Codeberg Pages post and wanted to use the same mountain image as on the Codeberg landing page. Since I couldn’t find the source on their website, I went to the Git history of the somewhat relevant repositories under various Codeberg organizations and found the homepage renovation pull request, which mentioned the source. Unfortunately, the page returned a 404.

404 page.

All I had to do was right-click and open the last Wayback Machine snapshot.

Firefox context menu with the item “Wayback Machine > Newest Version” highlighted.

Obviously, the download buttons didn’t work, so I visited the photo author’s Unsplash profile, but it returned a placeholder, so I used the one archived by Wayback Machine.

John Guest’s profile.

Unfortunately, his website didn’t have the photo I needed, so I had to use what I had: the thumbnail; its size was fine for the banner, so I went ahead and used it.

Screenshot of the Wayback Machine archive of the page.

But the fact that a low quality thumbnail was used for the banner kept bothering me, so I decided to locate the source.

Upon inspecting the link to the thumbnail image on Unsplash, I noticed that you can change some of its attributes to get a higher quality image, so I returned to the mountain photo snapshot and copied the link to it, removed the Wayback Machine prefix, and to my surprise it was still available, probably because images.unsplash.com keeps the deleted images anyway to avoid breaking hotlinks.

The solution

So what’s the perfect combination of link attributes to get the original image? It’s ?auto=format&q=100, these individually won’t return the original image, but together they will.

The resulting URL should look like this, without all the extra stuff like site tracking.

https://images.unsplash.com/photo-1575908524891-b0bdd2b99f90?auto=format&q=100

The solution, as you guessed, requires the existence of at least one Wayback Machine snapshot with the thumbnail; if there is no such snapshot, this hack won’t work because the images.unsplash.com image ID is different from the one on unsplash.com. Still better than nothing, huh?

Conclusion

Was it worth it? Maybe, maybe not. This shows once again how much I care about stupid little things that no one would ever notice.

Comments

You can comment on this blog post by publicly replying to this post using a Mastodon or other ActivityPub/Fediverse account. Known non-private replies are displayed below.

Open Post