Looking to access/output the Associated Image of a page separate from dspBody(). How do I go about doing that?

42 Views Asked by At

I'm trying to access the Associated Image for a page separate from a call to dspBody(). I see that I can get it using:

#$.content().getImageURL()#

But I need a specific defined size of the image. I have several custom sizes defined (like: medium, large, original, etc.).

I've tried passing the size in as a parameter as explained here - MURA: getImageURL small size cuts off the image

#$.content().getImageURL(size='original')#

But my HTML is coming back empty:

<img src="">

How do I go about pulling back one of my predefined sizes?

1

There are 1 best solutions below

0
Miguel-F On

Try it without specifying the size.
This works for me using Mura version 6.2.

#$.content().getImageURL('original')#

You can change original to whatever your custom image size is named.

<cfoutput>
<img src="#$.content().getImageURL('customname')#" alt="Alt Title" title="Image Title" />
</cfoutput>

See if this way works for you.