Pull random image from entries marked with a certain category I am trying to pull an image from services marked with a category of left. I would only like to display one image. I would also like to randomize the image if possible from all the images marked left. 

{# RANDOM IMAGE FROM SERVICES - LEFT #}
&lt;div class="grid-item"&gt;
    {% for homepage in craft.entries.section('services').limit('1').relatedTo(left).find() %}
        &lt;div class="image-wrapper overlay-fade-in"&gt;

            &lt;img src="{{ homepage.homepageImage.first().getUrl }}" alt="{{ homepage.title }}"/&gt;

            &lt;div class="image-overlay-content"&gt;

                &lt;h2&gt;{{ homepage.title }}&lt;/h2&gt;
                &lt;p&gt;{{ homepage.description }}&lt;/p&gt;
                &lt;a href="services.html" class="button"&gt;View Rental Pricing&lt;/a&gt;

            &lt;/div&gt;
        &lt;/div&gt;
    {% endfor %}
&lt;/div&gt;
Welcome to the Craft community @bjyama

{# Step one: pick a random service #}
{% set randomService = craft.entries.section('services').relatedTo(left).order('RAND()').first() %}

{# Step two: pick a random image from the above service #}
{% set randomServiceImage = service.homepageImage.order('RAND()').first() %}

{% if randomServiceImage %}
    &lt;img src="{{ randomServiceImage.getUrl('imageTransformName') }}" alt=""&gt;
{% endif %}


For more info, have a look here: https://craftcms.com/docs/templating/craft.entries#order

Let us know how you get on :)