Foros de discusión

Image from resources - Liferay DXP

thumbnail
Gustavo Oliveira, modificado hace 7 años.

Image from resources - Liferay DXP

Junior Member Mensajes: 98 Fecha de incorporación: 23/09/15 Mensajes recientes
Anyone found a way to reference an image from resources in a xhtml? Cant find a way to reference images from JSF resources, Im uploading images on Documents and Libraries to use.
thumbnail
Kyle Joseph Stiemann, modificado hace 7 años.

RE: Image from resources - Liferay DXP

Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
Hi Gustavo,
Please take a look at the portlet:resourceURL, h:graphicImage, and alloy:image examples. If you want to show an image from src/main/webapp/resources, you can use the pattern from these examples. To show an image from Documents and Media, I think you should be able to use DLUtil.getImagePreviewURL() in combination with h:graphicImage, alloy:image or a plain html img tag.
- Kyle
thumbnail
Gustavo Oliveira, modificado hace 7 años.

RE: Image from resources - Liferay DXP

Junior Member Mensajes: 98 Fecha de incorporación: 23/09/15 Mensajes recientes
Hey Kile, is it working for you? portlet:resourceURL, h:graphicImage, or alloy:image?

It worked on 6.2, but its now working on 7. Im using the last patched version.
thumbnail
Kyle Joseph Stiemann, modificado hace 7 años.

RE: Image from resources - Liferay DXP

Liferay Master Mensajes: 760 Fecha de incorporación: 14/01/13 Mensajes recientes
Hi Gustavo,
Please post the shortest, simplest code that reproduces your issue. Please also include the versions of Liferay, Liferay Faces, and any component suites that you are using. The showcase links that I provided are running on Liferay 7, so everything should be working correctly.

- Kyle