Foros de discusión

Broken images in Liferay 7

Aparna Paibhale, modificado hace 6 años.

Broken images in Liferay 7

New Member Mensajes: 3 Fecha de incorporación: 21/03/17 Mensajes recientes
Hi,

I have a WAR file with my images in it. Images are located in WEB-INF/resources/images folder. In my XHTML when i reference the images
by /resources/images/imagename.png it is getting resolved to /o/warfilename/resources/images/imagename.png.
And this results in a broken image. Please help.
thumbnail
Kyle Joseph Stiemann, modificado hace 6 años.

RE: Broken images in Liferay 7 (Respuesta)

Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
Hi Aparna,
Looks like you've run into a bug: https://issues.liferay.com/browse/FACES-3103. Please watch the issue to see when it has been resolved. To workaround this issue, use the library and name attributes of components or use EL to obtain the path to the resource. For example:

<h:graphicImage library="images" name="imagename.png" />
<h:graphicImage value="#{resource['images:imagename.png']}" />


- Kyle
Aparna Paibhale, modificado hace 6 años.

RE: Broken images in Liferay 7

New Member Mensajes: 3 Fecha de incorporación: 21/03/17 Mensajes recientes
Thanks Kyle ! That worked !!!
thumbnail
Kyle Joseph Stiemann, modificado hace 6 años.

RE: Broken images in Liferay 7

Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
Thanks for reporting this bug, Aparna! And thanks for using Liferay Faces!

- Kyle