Trying to output path for custom template for the Image block
I can't seem to output the path using the variables that are already listed in the core image block and I can't find anywhere in the forums which outlines how to do this.
This is what I've stripped the core image code back to:
and this is what it renders:
<script> $.backstretch("<img src="/concrete126.96.36.199/application/files/7414/2049/5444/nature-walk-resized.jpg" alt="nature-walk-resized.jpg" width="1000" height="667">"); </script>
Can anyone help me out and let me know what I need to call to be able to output the path without the html that wraps it.
There isn't a lot of documentation on image use in 5.7 yet.
In the meantime, you can use Core::make('helper/image') like 5.6's Loader::helper(‘image’). It has been removed from legacy -https://github.com/concrete5/concrete5-5.7.0/issues/1618... .
This allows you to use getThumbnail() and imagename->src.
I imagine this free block will be ready in the marketplace in a week or two.
$image = Core::make('html/image', array($f)); $imagePath = $image->getTag()->src;