Find Media outside Page

Hello,
i’ve a page with _modal sections.
In one _modal I have a gallery and I put all gallery images inside 01.home/_gallery/img.
On my file galley.html.twig I have

<section class="gallery slider">
	{% for image in page.find('/_gallery/img').media.images %}
		<div>
			<img src="{{ image.url }}" style="width:100%; height:100%">
		</div>		
    {% endfor %}
</section>

and it works OK, any image inside img folder is displayed on the gallery.

But, if I wanted to put all gallery images in another folder, for example 01.home/img (outside the modal)
I would have
01.home
|
__ gallery
|
__ img

I cannot put the something like
{% for image in page.find(’…/img’).media.images %}
working.

How can I do it?

Hugo,

You might consider putting the images in a single folder.
Have a look in the great documentation

Hello,
Thank you for reply.
I have already tested it, but it won’t work, I don’t know if is due to _modal pages inside home page that it won’t go to img folder.

Should be:

{% for image in page.find(’/img’).media.images %}

Because the find() method expects a full page route.