Hi to all,
I have spent a while on trying to figure out how custom1 and custom2 images work with no positive result.
I added below lines to portal-ext.properties
1dl.file.entry.thumbnail.custom1.max.height=400
2dl.file.entry.thumbnail.custom1.max.width=400
3
4dl.file.entry.thumbnail.custom2.max.height=600
5dl.file.entry.thumbnail.custom2.max.width=600
After restarting the portal I uploaded a 800px image
I then created a new WebContent structure and template
The structure code contains:
1<?xml version="1.0"?>
2<root>
3 <dynamic-element name="Image" type="document_library" index-type="" repeatable="false"/>
4</root>
The tempate code contains:
1#set ($newImage = $Image.getData())
2
3<A HREF="$newImage" target="_blank"><img alt="" src="$newImage" /></A>
4<A HREF="$newImage" target="_blank"><img alt="" src="$newImage+&imageThumbnail=1" /></A>
5<A HREF="$newImage" target="_blank"><img alt="" src="$newImage+&imageThumbnail=2" /></A>
6<A HREF="$newImage" target="_blank"><img alt="" src="$newImage+&imageThumbnail=3" /></A>
After Creating a Web Content selecting the new uploaded image and previewing I get:
$newImage and $newImage+&imageThumbnail=1
are displayed$newImage+&imageThumbnail=2 and $newImage+&imageThumbnail=3
are not displayedBased on the following code found in: ./portal-impl/src/com/liferay/portal/webserver/WebServerServlet.java
1if (imageId == dlFileEntry.getSmallImageId()) {
2 queryString = "&imageThumbnail=1";
3}
4else if (imageId == dlFileEntry.getSmallImageId()) {
5 queryString = "&imageThumbnail=2";
6}
7else if (imageId == dlFileEntry.getSmallImageId()) {
8 queryString = "&imageThumbnail=3";
9}
i expected to get:
original image (800px)
&imageThumbnail=1 (128px)
&imageThumbnail=2 (400px)
&imageThumbnail=3 (600px)
Seems to me that the custom images are not created. Looking through data directory there are only the original image and default thumbnail.
Am I doing something wrong??? Can it be a bug not creating the custom images when uploading??? Please help!
Thanks
Please sign in to flag this as inappropriate.