The original Random Image displayed rotating banners and photos. Today, JavaScript carousels and image APIs offer dynamic, animated solutions.
Image Display
Modern mobile touch slider. Framework agnostic (React, Vue, Angular support). Hardware accelerated transitions, lazy loading.
Lightweight, flexible slider. No dependencies, TypeScript support. Multiple slides, thumbnails, video support.
Dependency-free ES6 slider. Modular design, small footprint. Keyboard navigation, responsive breakpoints.
Beautiful, free images API. High-quality photos from professional photographers. Random endpoint, search, and collections.
Easy placeholder images. Simple URL-based API, no authentication. Specify dimensions, blur, grayscale in URL.
<img src="https://picsum.photos/400/300?random">
Placeholder images of kittens. Simple URL-based, great for development and testing.
const images = [
'image1.jpg',
'image2.jpg',
'image3.jpg'
];
const randomIndex = Math.floor(Math.random() * images.length);
document.getElementById('banner').src = images[randomIndex];
// Or with CSS background:
document.body.style.backgroundImage =
`url('${images[randomIndex]}')`;
| Feature | Random Image CGI | Modern Solutions |
|---|---|---|
| Transitions | None | CSS/JS animations |
| Lazy loading | No | Built-in |
| Touch/Swipe | No | Yes |
| Responsive | No | Yes |
| Thumbnails | No | Yes |
| Autoplay | Page refresh | Continuous |
| Server load | Each request | Client-side |
Full-featured: Swiper
Lightweight: Splide or Glide.js
API images: Unsplash
Placeholders: Lorem Picsum
npm install swiper
npm install @splidejs/splide
npm install @glidejs/glide