# Random Image Rotation

**URL:** <https://community.hubspot.com/t/random-image-rotation/8397>\
**Category:** CMS Development\
**Created:** [April 5, 2018, 9:47am UTC](https://community.hubspot.com/t/random-image-rotation/8397 "2018-04-05T09:47:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoxannaBayram](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/roxannabayram/32/77159_2.png) [@RoxannaBayram](https://community.hubspot.com/u/RoxannaBayram)\
**Post date:** [April 5, 2018, 9:47am UTC](https://community.hubspot.com/t/random-image-rotation/8397/1 "2018-04-05T09:47:40Z")

</div>

Hi HS Community,

Would appreciate any support on this!

We are trying to have a random image rotation feature on our team page, which links to individual team member photos. Rather than having the whole team showing, we wanted to be able to only view three team members but for them to randomly generate when the page loads each time.

Has anyone tried this in HS, or had any success with importing their code from elsewhere?

Thank you in advance for the time taking to read this and/or reply.

Roxanna

---

<div class="post-metadata">

**Author:** ![AJLaPorte\_diagr](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ajlaporte_diagr/32/24548_2.png) [@AJLaPorte\_diagr](https://community.hubspot.com/u/AJLaPorte_diagr)\
**Post date:** [April 5, 2018, 3:10pm UTC](https://community.hubspot.com/t/random-image-rotation/8397/2 "2018-04-05T15:10:29Z")

</div>

Hi Roxanna,

You could build your member listing using HubDB (if you have it available: [HubDB - HubSpot docs](https://designers.hubspot.com/docs/tools/hubdb)) and then make use of HubSpots **random** filter here: [Accounts Dashboard | HubSpot](https://designers.hubspot.com/docs/hubl/hubl-supported-filters)

This would allow you to pull 3 random entries from the DB to display. It’s also a better use case for using HubDB with any kind of directory listing as its less work than having to create a grouped module for each “card” for an employee.

Hope this helps point you in the right direction.

-AJ

---

<div class="post-metadata">

**Author:** ![John](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/john/32/43512_2.png) [@John](https://community.hubspot.com/u/John)\
**Post date:** [April 9, 2018, 2:09pm UTC](https://community.hubspot.com/t/random-image-rotation/8397/3 "2018-04-09T14:09:55Z")

</div>

In my experience with the random filter, it pulls random data, but it does not do it on each query. So, the same “random” data shows every time the page is loaded. Does this happen to anyone else?

I have tried this with testimonials.
