Add Unsplash category selector
kinnectus opened this issue · comments
Just found this most epic of sites and wondered if an Unsplash category filter could be added to only return photos from a specific category:
E.g. https://picsum.photos/200/300/?cat=textures-patterns
Use case: placeholder background where one doesn't want any object/person pictures to be returned, or only return pictures of people if one wants to demonstrate a person profile page.
Hi!
We’re not planning to add this currently. I would recommend trying out https://source.unsplash.com if you want categories
Quick followup to help connect the dots for anyone looking for profile picture photos, you can get profile photo-like URL from unsplash as follows:
async function getRandomHeadshot(width, height) {
const res = await fetch(`https://source.unsplash.com/${width}x${height}/?headshot`);
return res.url;
}
[Edit: Actually, the above isn't working that well for me. Instead, I'm just generating random URLS to the images at https://randomuser.me/photos ]