function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ericmonteericmonte 

Site.com dynamic image

Is it possiblie to retrieve the image dynamically from a record? For example, in a regular visualforce page we can use apex:image and you can set the value based on the image file that was uploaded.

Currently, in my object i have a field where it holds the URL for the uploaded image. I'm able to use apex:image in a regular Visualforce page, but I cant seem to figure out a way to dynamically display the image based on the URL from the record.

Is this even possible?
Offshore Freelance ConsultantOffshore Freelance Consultant
Hi,

Yes, its possible.

Assume the variable that has the image name is VarImage. 


<apex:image id="theImage" value="{!VarImage}" width="220" height="55"/>


will do the trick.

********************************
Hope this helps!

JG

ericmonteericmonte
I'm referring to salesforce site.com dynamic images. I know it can be done in a visualforce page for force.com sites.
Offshore Freelance ConsultantOffshore Freelance Consultant
Hi,

User-added image



User-added image


********************************
Hope this helps!

JG
ericmonteericmonte
Yea i tried that. Unfortunately the image will not be in the Site.com Page Asset information. The Image itself is uploading in the attachement and then the URL is pasted into the record. In the UI i can do the Image formula to display the image, but what I can't do is pull up the image from site using the above information.
AndrewTaylorAndrewTaylor
Were you ever able to solve this?
ericmonteericmonte
Unfortunately not :(