2. Image Gallery

Like the Document Library, the Image Gallery provides a central repository for images used throughout the Liferay Portal by a unique URL. The arrow image ( ) can be found throughout Liferay's website as a navigation icon.

Each instance uses the same uniqueURL: @root_path@/image/image_gallery?img_id=15.

2.1. Adding an Image

  1. To add an image to the Image Gallery portlet, first add a folder by clicking the Add Folder button. This is similar to adding a folder to the Document Library, described in Section 2.1.1. This use case will show an Image Gallery with three folders already created: COMMON, HOME-INDEX, and PRODUCTS-LIFERAY.

  2. We will now add an image to the COMMON folder. Clicking on COMMON takes you to the folder view. Click on Add Image to add a new image.

  3. Here we add the image by pressing the Browse button and selecting the image to upload. Keep in mind that image size can be no larger than 300k. Give an easily identifiable description for the image, and then click Save.

  4. After saving, you are returned to the folder in which you saved it in. As can be seen by the breadcrumb, the COMMON folder is displayed in the figure below. You can position your cursor over the image for a description, and click on the image for a full-size view.

2.2. Referencing an Image

  1. To reference an image in the Image Gallery, you must first find which folder the image is contained in. Using the same use case as in 2.2.1, we see that our image is located in the COMMON folder, as shown by the breadcrumb.

  2. Click on the Edit icon () to view the properties of the image. The URL is highlighted in the picture below. To reference this image in Journal Templates in this use case, you would type in @root_path@/image/image_gallery?img_id=43. Templates are described more completely in section 3.2.

2.3. Viewing Image Slideshow

  1. You can view all the images from a folder in a slideshow. To view the slideshow, click on the View Slide Show button in the folder you want to view.

  2. A new window will appear showing a full-size image and a set of commands. It will repeatedly scroll through the images inside the folder chosen. To view images at your own pace, press Pause and press the Next or Previous buttons to change images. There is also a speed setting from 1 through 10, with 1 being the fastest and 10 the slowest. Press Play to resume the slideshow at the chosen speed.