Implemented using HTML
, CSS
and vanilla JavaScript
Compiled with Vite
This simple app renders random images while scrolling vertically which should give you a feeling of going over endless collection of images.
New images are fetched using Lorem Picsum API which takes images from Unsplash API.
First few images are rendered when the app is loaded. Next pictures are added while scrolling, before you reach the bottom of the list.
Why didn't I just use Unsplash API then?
- I have no experience in back-end and I haven't learned yet how to secure API keys
- I wanted to practice making API calls :)
- Img size values defined in
app.js
have no effect on the returned images.- The reason for that is swaping URLs while fetching data.
- However, it is necessary to get metadata like source, author, etc.
- Images loaded to app have high resolution which slows the app down when Internet connection is slow
Loops icon created by Pixelmeetup - Flaticon