0

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"/>

1 Answer 1

0

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" />

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.