# Randomizing images

**URL:** <https://forum.kirupa.com/t/randomizing-images/37083>\
**Category:** web dev\
**Created:** [December 5, 2003, 4:21pm UTC](https://forum.kirupa.com/t/randomizing-images/37083 "2003-12-05T16:21:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cutnedge](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cutnedge](https://forum.kirupa.com/u/cutnedge)\
**Post date:** [December 5, 2003, 4:21pm UTC](https://forum.kirupa.com/t/randomizing-images/37083/1 "2003-12-05T16:21:53Z")

</div>

Hi, does anyone knows how to random images as per load? For example: On my index.html I have a header image let’s say is 700 pixels wide and 200 pixels height. I would like to SWAP different images (same size) at different times but, only when the user refreshes the screen and when the user goes to that page for the first time. I have seen it before. I know it’s done via Javascript. Any suggestions?

Thank you
