We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Display image from a channel.

How Do I?

Jason Stringer's avatar
Jason Stringer
19 posts
5 years ago
Jason Stringer's avatar Jason Stringer

Hi,

I am sure this is a stupid question, how to display an image from a channel when an image field has been created. {product_image or * {product_image}* when I used the image tag I see a block image but no image.

Thank you for your time and help.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

So the image is in a file field in a channel entry- right?

Assuming the name of the file field is {product_image}:

{exp:channel:entries channel="products"}
<h3>{title}</h3>

{product_image wrap="image"}
{/exp:channel:entries}

You’ve got a lot more flexibility than that, especially if you use a variable pair:

{product_image}
This file is a {extension} and was uploaded on {upload_date format="%Y %m %d"}

<img src="{url}" alt="{title}">

{/product_image}

See the file field docs for a full overview.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.