I want to include images into a BIRT report. The images shall be given by a XML data source (base64 encoded). But the XML data source does not support the Blob data type.
I found a nice answer in this BIRT question where the base64 encoded image data is included as URI (data:image/png;base64,...BASE64DATA...
). So I tried myself with a small static example but BIRT (4.4.2) does not show the image. Firefox displays the image when I paste the URI into the address bar.
Here is a small static BIRT test report to reproduce the problem.
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 4.4.2.v201410272105 Build <4.4.2.v20150217-1805></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<styles>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
</simple-master-page>
</page-setup>
<body>
<image id="7">
<property name="source">url</property>
<expression name="uri" type="constant">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAIAAAC0tAIdAAAACXBIWXMAAAsTAAALEwEAmpwYAAACa0lEQVR4nE2SW0iTYQCG3+/bv4Pb3GqeJuWcadJJ1Lww1KiLKUbZQSzCwJCiLotu6yYIvPAyiIRIDDITUdO0VQZFKAaTLMPpdLL9rKlNnbr57/Tv+7rQyOf6uXjhfQjnHAAAzvl7+/CSdxzxJSkU0Or0UGXvL6y22WrwD7Jti6I41P3o/Kn0fTkHQLXgcSQCiPk8C85hh7G++bHZbN6xvV7PaP+dxgvHoMmHxgJhD5ISYj5E3Yi4ILnah2JnbtrNZjNljL3rvNtYawBNgUIPIR2aPKiyIRhAtSBqUGWzbbnv2Q0AirLSozX5b9Uppo5h6fu8IIr+Q4V5YOEl/8KLQf/U4kHnzExRzkpmitfhK6Zr7q4MY7zv0++iylbnXAVXV/xw2BH1fPjiLDhy781gpsrSMifGc83UN/2Kkq0JyJuxmCyKQk/PV0HIWlucQsRF5NVwmITDKiCqFAAAoQnFpZO8uIBlm6Lj0+LZiyUBd1v9aYHKgdy01W8T9tKSqG615cThGIDRySDpeJjTVC0BhFOtJBt1eiOIElxGMgw5iGQY2DmkfSRDYNoSYAzghG3pqITICggFGJgMMOyCpJZRg/VyMMQB/HQnAQ4eB4uCxbfVeAJPeqMc8K+wrMIrJJFIPG+pumWbF5dZ68tIea7CbFGoVWR9gwVnZLs32XZfn6olT0eKbz8YIZxzl2v210BtfWUoJPH+19HIWFxe54Y0KlQp6xo0Og3p/JxWde2jxWLZ6cTlmv3cdb2hfM5kILu3/gmyXkdRbVOH1Wr9XxUAWZYH+rs2Pd1UmoS8AWEv0x03FVw9V9dAKd12/gIfwCYkqvTc3gAAAABJRU5ErkJggg==</expression>
</image>
</body>
</report>
Update: The img tag in the generated HTML looks like
<img ... src="/viewer/data:image/png;base64,......"></img>
So the problem seems to be that BIRT adds /viewer/
to the URI.
Is there any configuration so that BIRT does not add anything to the URI defined in the report?