Rotating images of your products on the home page. It’s a great way to capture a larger audience, and to additionally get their attention. Using one of my clients sites as an example, they have rotating images of gas bbq’s on their home page. On their site the image only changes when the page refreshes, but you can also have it change every few seconds.
Capturing a Larger Demographic
So what happens when you have a different picture on your home page every time it refreshes? You potentially increase your demographic. Everyone knows the landing page is a common landing spot, but it is also a common start over spot. Seeing an alternate product could make all the difference in the world.
Let’s say for example I was looking for charcoal bbq’s, and I landed on their home page seeing a screenshot of a gas bbq. Not what I was looking for. Few page clicks later, I’m back on their home page, and hey, there is a picture of a charcoal bbq. That’s what I was looking for. By showing off a few alternate products on the home page, they have opened up to both guys on the fence, the gas lovers and the charcoal lovers. Personally, I love both. It depends on what I cook.
Getting Their Attention
Another great benefit of having a rotating image is that it works as an advertisement for your own site, and helps captures a new visitors attention. If you have the image rotate on a timed basis, instead of waiting for a page refresh, you can quickly show off some of your best selling products.
Easy to Do
For those of you that like PHP like I do, here is a quick lettle example on how easy it can be.
<?php
$randomimage = rand(0,2);
$picture[0] = “<img src=’http://www.bestwebimage.com/wp-content/themes/looter-xp-10/logo.jpg’ >”;
$picture[1] = “<img src=’http://www.bestwebimage.com/twitter.gif’>”;
$picture[2] = “<img src=’http://www.bestwebimage.com/wp-content/uploads/2009/02/grill.png’>”;echo $picture[$randomimage];
?>
See it in action: http://www.bestwebimage.com/blogsamples/rotateimage.php Don’t forget to hit refresh to see the new image.

Great post, and thanks for stopping by my website as well. I agree, fresh rotating content can provide a quality appeal to repeat visitors. Look forward to viewing your website further.
I too have seen this work in practice. Indeed, it is a great way to keep business units from fighting over the homepage! I would add one thing to your sample code–and that would be a link to the featured product.
Thoughts?
Definitely having it link would be a good idea. You could have all link to one spot, or to their each unique page. It’s whatever you put in the string.
I love the idea of rotating images. When I use them I have it set to only rotate when the page is refreshed but I have seen sites that have them change automatically.
I don’t mind them changing automatically as long as it’s not too often to make it annoying while reading.
I like the idea of have a blog header that rotates. It can be refreshing to see a new header image on the blogs I love to follow.
[...] Rotating Images – A simple example on how to have an image change randomly using PHP. [...]
[...] Rotating Images – Here is another one that surprised me. A simple example in php on how to rotate images. I guess a lot of people want to know how. [...]
Rotating images or even content is a great practice. It definitely increase your chance of piquing a visitor’s interest.
wertwert