Random Image picks one image at random from a set you choose and shows it on the page. Each time the page loads, visitors may see a different picture. Size, crop and border it like a normal image element.
Each demo below is a Random Image with its own set of photos: a hero banner, a menu tile, a round photo and a gallery grid. Press Reload the page, or refresh your browser, and each one picks again.
Five landscape photos, Aspect Ratio 16:9, Object Fit cover and a 16px radius. The text sits on top in its own layer.
Small groups, local guides and your bags carried between inns.
Three dish photos, Aspect Ratio 1:1, Object Fit cover and a 20px radius.
Harbour Kitchen Lunch is served from 12:00 to 15:00. Ask about today's specials at the counter.
Five pet photos, Aspect Ratio 1:1, a 50% radius and a 6px lilac border to make a circle.
Pawprint Grooming A different happy customer each time you visit.
Three Random Image elements with the same five pottery photos. Aspect Ratio 4:3 and a 12px radius. Each tile picks on its own, so two tiles can show the same photo.
As simple as adding a normal image.
Drop Random Image where you want the picture to appear.
Select as many images as you like from the media library.
Choose a width, height, aspect ratio and object fit, and add borders if you want them.
A small element that keeps pages feeling fresh.
Select as many images as you like from the media library.
An image is chosen at random every time the page loads.
The random pick happens in the browser, so it still changes on cached pages.
Use 1:1, 4:3, 3:2, 16:9, 8:5 or a custom ratio so every image fits the same space.
Choose cover, contain or fill to control how each image sits in its box.
Set the width and height like any other image.
Add borders and rounded corners.
Turn on lazy loading to help page speed.
Place several on one page, each with its own set of images.
Anywhere a little variety helps.
Rotate the main image on your homepage.
Show a different customer photo on each visit.
Show a random piece of work each time.
Rotate promotional banners without a slider.
Show a random team photo in a sidebar.
Build a grid where every tile can change.
This is the full list of settings in the Breakdance editor.
| Control | What it does | Default |
|---|---|---|
| Content | ||
| Images | Choose the images to pick from. | — |
| Lazy Load | Load the image only when it is near the screen. | — |
| Design | ||
| Width | Image width. | — |
| Height | Image height. | — |
| Aspect Ratio | 1:1, 4:3, 3:2, 16:9, 8:5 or Custom, with custom width and height. | — |
| Object Fit | Cover, Contain or Fill. | — |
| Borders | Borders and corner radius. | — |
Yes. The image is picked in the visitor's browser when the page loads, so cached pages still show a random image.
Yes. Each load is a fresh random pick, so the same image can come up again, especially with a small set.
Set an aspect ratio and use Object Fit cover so every image fills the same space.
Yes. Each Random Image makes its own pick, as the demos on this page show.
Random Image is included with Phox Elements, along with 140+ other premium elements for Breakdance.