How to display a base64 image

UI Components for JSF
Post Reply
yumar
Posts: 3
Joined: 30 Jul 2015, 19:30

30 Jul 2015, 19:52

How to display a base64 image with any primefaces image render component.

Thanks in advance.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

30 Jul 2015, 21:17

Using p:graphicImage value attribute;

http://stackoverflow.com/questions/8499 ... es-in-html

yumar
Posts: 3
Joined: 30 Jul 2015, 19:30

18 Aug 2015, 22:00

Thanks a lot for your help.

Here an example:

<h:graphicImage value="data:image/jpg;base64,#{eventBean.detail.photo}" style="max-width: 300px; max-height: 300px;" />

Where eventBean.detail.photo is my base64 String image.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests