Anyone know a way to use the media image resizing function when you only have the image path? So e.g. {{ image.cropZoom(600,400).quality(100).html() }} would output the image IF grav knows it’s an image or in an image/media loop
…But i only have the path not the image - Grav doesn’t know its an image because it’s coming from an array in the yaml - so this:
I don’t know if it works. But maybe you try something like this:
—twig
{% for item in page.header.gallery2 %}
{% endfor %}
If this doesn't work, maybe you could test this way
---twig
{% for item in page.header.gallery2 %}
<div class="img-responsive">
{{ page.find(item.path).media[item.name].cropZoom(600,400).quality(100).html() }}">
</div>
{% endfor %}
---
Update: Thsi should give you the solution!
—twig
{% for item in page.header.gallery2 %}
{{ page.find(item.path).media[item.name].cropZoom(600,400).quality(100).html(’’,’’,‘img-responsive’) }}