Jump to content

How to display image from image field that has variations?

Recommended Posts

(Sorry for the dumb question. I'm just getting started.) I literally have an image field called "featured_image" with a limit of 1 image. Every time I try to output this image, it renders twice. It's driving me nuts. I don't get why.

    echo page()->featured_image;

the page outputs:

zara.png zara.png

Screen Shot 2019-12-07 at 9.50.10 PM.png

Screen Shot 2019-12-07 at 9.50.17 PM.png

Share this post

Link to post
Share on other sites

I deleted the blog profile I was playing with and setup the blank profile instead. It's outputting a single instance now as it should with:

<?php echo $page->featured_image->url; ?>

Maybe the default blog profile had some duplication going on at the top of the blog template that I wasn't aware of, (although I didn't see anything that indicated the code should repeat).

Either way, all good now! Thank you!

I'll most likely stick with the blank template anyway.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...