Jump to content

Image field in news post


gregory
 Share

Recommended Posts

Hello guys, how can I view the image field? I need to view the Image associated to the post of the news. Thank you

  Reveal hidden contents
Link to comment
Share on other sites

<img src='{$story->imagefieldname->url}' alt='{$story->imagefieldname->description}' /> // single image field
<img src='{$story->imagefieldname->first()->url}' alt='{$story->imagefieldname->first()->description}' /> // multiple images selecting the first

https://processwire.com/api/ref/pageimages/
https://processwire.com/api/ref/pageimage/

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...