Search the Community
Showing results for tags 'first image'.
-
Hi guys. I would like to show only the first image as a preview of a slideshow. The code below shows the first image but is repeated. Do you know a solution? Thank you //Call image foreach($story->galleria as $img) { echo "<img src='{$story->galleria->first()->url}' alt='{$story->galleria->first()->description}'>"; }
-
I am trying to output a list of link to children pages that display the child's title and the first image on the child page. I am doing that ok but I do not know how to return a thumbnail size image rather than full size. My image field is called "selectedimages". This is what I have: <?php if ($page->children) { foreach($page->children as $selectedthumbs) { $firstimage = $selectedthumbs->selectedimages->first(); echo "<a href='{$selectedthumbs->url}'><img src='{$firstimage->url}' alt='{$firstimage->description}'></a>"; }} ?>
- 16 replies
-
- first image
- children
-
(and 1 more)
Tagged with: