Get random image from certain page

Hi everyone,
I have a certain kind of page (company). In the admin on the company page, the user can upload a logo for every company. Now I would like to show a random company logo on the homepage. How can I do such a thing?

In the blueprint I added the following line to determine the location of the logos: destination: 'theme@:/assets/logos'

How do I accomplish this? Thanks a lot for your help in advance!

What i would do, is put all the logos into a page folder such as user/pages/logos. You don’t need a .md file, just the logos themselves. That way you can get all the logos as an array via:

{% set logos = page.find('/logos').media.images %}

Then simply pick a random one from that array:

{% set random_logo = random(logos) %}

Then you can just output that as an HTML tag:

{{ random_logo.html }}

or a URL:

<a href="{{ home_url }}"><img src="{{ random_logo.url }}" /></a>

Thanks @rhukster!