Forums de discussion

Image from resources - Liferay DXP

thumbnail
Gustavo Oliveira, modifié il y a 7 années.

Image from resources - Liferay DXP

Junior Member Publications: 98 Date d'inscription: 23/09/15 Publications récentes
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, modifié il y a 7 années.

RE: Image from resources - Liferay DXP

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
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, modifié il y a 7 années.

RE: Image from resources - Liferay DXP

Junior Member Publications: 98 Date d'inscription: 23/09/15 Publications récentes
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, modifié il y a 7 années.

RE: Image from resources - Liferay DXP

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
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