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
Shukla YogeshShukla Yogesh 

Unable save visualforce page displaying image from url

Create a Visualforce page without the standard Salesforce header and display an image using the Visualforce image component.
1.The page must be named 'DisplayImage'.
2.It must NOT display the standard Salesforce header.
3.It must use a Visualforce apex:image component to display this image - https://developer.salesforce.com/files/salesforce-developer-network-logo.png

 
<apex:page showHeader="false" controller="DisplayImage">  
    <apex:pageBlock>
        <apex:image  url="developer.salesforce.com/files/salesforce-developer-network-logo.png"/>
        </apex:pageBlock>
</apex:page>


 
Selim BEAUJOURSelim BEAUJOUR
Hi Shukla. 
why do you write "controller="DisplayImage"? Try whitout.
Shukla YogeshShukla Yogesh
I tried but no luck.

User-added image
Olga GlovatskaOlga Glovatska
Hello, Shukla
Try to add in url "https://":

<apex:page showHeader="false" >  
    <apex:pageBlock>
        <apex:image  url="https://developer.salesforce.com/files/salesforce-developer-network-logo.png"/>
    </apex:pageBlock>
</apex:page>
Sherwin liSherwin li
Hi Shukla,

  I am meeting the same situation like you here. Have you figured that out? Could you enlight me a bit? 

Thank you.
Shukla YogeshShukla Yogesh
Hi Sherwin,

I think I misunderstood the challenge.
Later I had downloaded the image and added to static resources and it worked as required.
 
<apex:page >
    <apex:pageBlock >
        <br/> 
    <apex:image url="{!URLFOR($Resource.vfimagetest ,'cats/kitten1.jpg')}"/>
    </apex:pageBlock>
</apex:page>
Please let me know if you face any issue.

Thanks,
Yogesh
 
pamela Chatterjeepamela Chatterjee
Following code works for me,

<apex:page showHeader="false">  
    <apex:pageBlock>
        <apex:image  url="https://developer.salesforce.com/files/salesforce-developer-network-logo.png"/>
        </apex:pageBlock>
</apex:page>

Here is teh output:

User-added image

Thanks.
Nitesh PolakhareNitesh Polakhare
apex:page showHeader="false" >  
    <apex:pageBlock>
      <apex:image  url="https://developer.salesforce.com/files/salesforce-developer-network-logo.png"/>
    </apex:pageBlock>
</apex:page>

Write it on own without copying.