Public
Edited
Dec 17, 2022
1 fork
2 stars
Insert cell
Insert cell
/**
* Go from unsplash browser url to source image url
*/
function unsplash(url) {
let imageId = url.split("/").slice(-1)[0]
let imageUrl = "https://source.unsplash.com/" + imageId
return imageUrl
}
Insert cell
src = unsplash("https://unsplash.com/photos/4Ennrbj1svk")
Insert cell
img = fetch(src).then((response) => response.blob())
Insert cell
<img src=${URL.createObjectURL(img)} width=200>
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more