I am trying to make an image appear in a project using primefaces. I am using graphicImage but when i run the program, the image does not appear correctly. I have the image in a resoure folder, and in the WEB-INF folder
I am using this code:
<p:graphicImage value="image1.png" rendered="true"/>
If your image is inside the resources folder you need to point to it:
<p:graphicImage value="/resources/image1.png" />
Even better if you create a folder named images inside the resources folder, to keep it nice and clean like this:
<p:graphicImage value="/resources/images/animation-iris-small.gif" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.