Share your repls and programming experiences

← Back to all posts
Infinite image gallery
RolandJLevy (1092)

Infinite image gallery fetched from the Unsplash API, loading 10 at a time. Made with just 44 lines of vanilla JavaScript ⭐

Links 🔗

minishxp (7)

This is really cool. Unsplash is really cool too. The gallery isnt really "infinite", it's just really really REALLY big.

RolandJLevy (1092)

@minishxp I guess you've made a good point, infinite is...

JWZ6 (713)

why is this a repost?

RolandJLevy (1092)

@JWZ6 where else have you seen this posted? I don't think it's a repost - unless you're thinking of this post which is for a different repl:

JWZ6 (713)

@RolandJLevy oh sorry i meant that post yeah but they had similar features. btw nice CSS, (i forgot to say that)

RolandJLevy (1092)

@JWZ6 OK np, I thought they were quite different but I suppose they both have an infinite quality... :)

maxina (65)

@codingjlu Nothing, just pointing it out xD

codingjlu (481)

@maxina lol he already said that

RolandJLevy (1092)

@maxina the images are fetched from the API using the URL from line 27 on scrpt.js:

const randomUrl = `${baseUrl}/${counter++}`;

BIue (68)

s' there a search system :o