You need to sign in to do that
Don't have an account?

Developer Trail Beginner - Visualforce Basics - Using Static Resources - Challenge
Challenge Description:
- Upload a specified zip file as a static resource. The zip will have directories with images and you have to display a specific image on a Visualforce page.The page must be named 'ShowImage'.
- This file must be uploaded as a Static Resource named 'vfimagetest'.
- The page must have a Visualforce apex:image tag that displays the 'kitten1.jpg' image from the 'cats' directory of the static resource.
Screenshot of Visualforce Page:
Screenshot of Resource Page:
Screenshot of page preview:
Exact text of error:
Challenge not yet complete... here's what's wrong:
The page does not include a reference to the specified image
Can't figure out whats wrong, everything looks like its working perfectly and I used the examples in the module as a base for the code.
try removing show header = false since I don't see that as part of the exercise.
also try removing the first slash in the path.
Here's the revised code.
Thx
Also it looks like you are new to this forum, Welcome!!!
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
This will help keep the forum clean and help future users determine what answers are useful
and what answer was the best in resolving the user's issue.
Thanks
All Answers
try removing show header = false since I don't see that as part of the exercise.
also try removing the first slash in the path.
Here's the revised code.
Thx
Also it looks like you are new to this forum, Welcome!!!
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
This will help keep the forum clean and help future users determine what answers are useful
and what answer was the best in resolving the user's issue.
Thanks
It was the "/" (I had previously tried with/without the showheader line). That's idiotic. The page had the correct images displayed; that should have been enough.
The page does not include a reference to the specified image
am also getting same problem
<apex:page>
<apex:image url="{!$Resource.vfimagetest}" width="50" height="50"/>
</apex:page>
Hi,
This code is pretty straight forwad, but I got error from developer console, "Static Resource named vfimagetest doesn't exist, Check spelling. it was downloaded by default to Download folder when clicking on "This file" in the Challenge. Did I miss anything?
Thanks.
<apex:page >
<apex:image value="{!URLFOR($Resource.vfimagetest, '/cats/kitten1.jpg')}" />
</apex:page>
<apex:page >
<apex:image url="{!URLFOR($Resource.vfimagetest, 'cats/kitten1.jpg')}" />
</apex:page>
The Static Resource 'vfimagetest' was not found. Below is the code I wrote out
<apex:page >
<apex:image url="{!URLFOR($Resource.vfimagetest, 'cats/kitten1.jpg')}" />
</apex:page>
Am I doing anything wrong? Did I miss something?
Perfect it solved the isue. However, Silly from Challenge creator but we move on :).
Thanks a lot !!!
I tried everything which you guys suggested but still could not complete the challenge
This is my code
<apex:page >
<apex:image url="{!$Resource.vfimagetest}" width="70" height="70"/>
</apex:page>
Error is
"The page does not include a reference to the specified image. HINT: The static resource does not require a '/' in the image URL. If you are using this, try removing and check again."
Can anyone help me with this.
<apex:page >
<apex:image alt="cats" title="kitten"
url="{!URLFOR($Resource.vfimagetest, 'cats/kitten1.jpg')}"/>
</apex:page>
Thanks.
Thank you for your above solution.
I have a doubt how it resolved the issue of "The static resource does not require a '/' in the image URL. If you are using this," in the code.
It will be a great help if you give me a proper explanation.
Thanks and Regards
Shubham
I am unable to see the image,only the small image icon is visible on the page.plz help me resolve this issue.I have use the below code
<apex:page> <apex:image url="{!URLFOR($Resource.vfimagetest, 'cats/kitten1.jpg')}" /> </apex:page>
Hi all experts,
I have one query.
I am getting the image icon instead of kitten image.
By the way, the challenge is completed but the kitten image is not displayed?
<apex:page >
<apex:image alt="cats" title="kitten"
url="{!URLFOR($Resource.vfimagetest, 'cats/kitten1.jpg')}"/>
</apex:page>
<apex:page showHeader="false" title="DisplayImage" sidebar="false">
<apex:image alt="cats" title="kitten"
url="{!URLFOR($Resource.vfimagetest, 'cats/kitten1.jpg')}"/>
</apex:page>
Please try the below code. It will work fine.
<apex:page >
<apex:image value="{!URLFOR($Resource.vfimagetest, 'cats/kitten1.jpg')}" />
</apex:page>