I'm using it this way: XHTML:
<p:graphicImage value="#{emitenteBean.myImage}"
Bean:
private StreamedContent myImage;
try {
FileInputStream fileInputStream = new FileInputStream("/Users/user/files/minhaImg.jpg");
myImage = new DefaultStreamedContent(fileInputStream, "image/jpeg");
} catch (FileNotFoundException e) {
System.out.println("ERRO AO CONVERTER IMG.");
}
Does not display the image and does not display an error.