Resolution: Won't Fix
Affects Version/s: 6.1.20 EE GA2
Fix Version/s: 6.1.20 EE GA2
Environment:LIFERAY VERSION: 6.1 GA1
OPERATING SYSTEM: Windows Server 2008
APPLICATION SERVER: Tomcat 7.0
JAVA VIRTUAL MACHINE: Java 6
Shindig is rewriting all images and there's a bug with PNG images - they are corrupted and whole image is filled by the color of the first pixel. The bug is not still resolved: https://issues.apache.org/jira/browse/SHINDIG-1665.
STEPS TO REPRODUCE
1. Create simple gadget. Go to Control Panel choose "Opensocial Gadget Editor" from left menu.
2. Add following xml to gadget editor area. This xml contains gadget declaration with an image - jquery-ui icons PNG with transparent background:
<?xml version="1.0" encoding="utf-8" ?>
<Require feature="opensocial-1.0" />
<Require feature="osapi" />
<Require feature="dynamic-height" />
<Content type="html"> <![CDATA[
<img src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.9.0/themes/base/images/ui-icons_222222_256x240.png" alt=""></img>
3. Click Save button.
4. From gadget context menu choose "Publish"
5. Create Page on Liferay portal and drag and drop the gadget to the page (Add-> More -> Gadgets -> Gadget):
6. This should result in a block of dark gray color filling the portlet instead of individual icons.
1. Disable PNG image URL rewriting in html markup - disable liferay proxy (configuration property "shindig.content-rewrite.exclude-urls")
2. Set min threshold for image size that are allowed to be rewritten to some big value like 1GB (configuration property "shindig.image-rewrite.min-threshold-bytes" in shindig.properties file)
First option has drawbacks because all requests for PNG images would go directly to the web server and it would need to be exposed to internet. Clients would have access not only to Liferay server but to the web server.
Second option's only drawback is in Shindig source code in that it is reading full image body to object model before checking this parameter. This would result in increased latency of the request and the request is not using buffered output.