- Search for photo by viewing on unsplash.com and finding ID in URL. For example https://unsplash.com/photos/photo-of-green-leafed-plants-QKo-op_gR9I which has ID
QKo-op_gR9I
- Grab your access key from Unsplash API dashboard:
ACCESS_KEY_GOES_HERE
- Grab JSON file by plugging in ID and client_id into API so URL looks like this: https://api.unsplash.com/photos/QKo-op_gR9I?client_id=ACCESS_KEY_GOES_HERE
- Pull out the regular size URL from the JSON in "urls > regular" key (which is 1080 wide) and use that in the site
Created
December 20, 2023 22:56
-
-
Save briangershon/fe7a2b0ba366a966e64e64ab98b40776 to your computer and use it in GitHub Desktop.
How to link directly to an unsplash.com image (via Unsplash API)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment