Message Boards

Resource importer Images

thumbnail
Massimo Bevilacqua, modified 6 Years ago.

Resource importer Images

Regular Member Posts: 210 Join Date: 12/27/16 Recent Posts
Hi,

I am trying to use the resource importer and I have this problem, if I create an article with an image the images is not displayed.
In the documentation I have found this example:

<p><img alt="" src="[$FILE=avatar.png$]"></p>


but it doesn't work. Using chrome dev tool I have discovered that images are added with version:
<img alt="" src="/documents/50703/0/avatar.png/5e9fbbd2-bfde-9ef2-6817-257b7e36b43f?t=1502702797064&amp;version=7.0">


If I delete the version, the images shows up
<img alt="" src="/documents/50703/0/avatar.png/5e9fbbd2-bfde-9ef2-6817-257b7e36b43f?t=1502702797064&amp;">


How can I prevent liferay to insert image version when it creates the image URL?
thumbnail
Olaf Kock, modified 6 Years ago.

RE: Resource importer Images

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
It might rather be a double-encoding of the "& "(in the form of "&amp;") - try replacing it in the URL (not sure if you're encoding the URL yourself or how you end up with this escaped character)
thumbnail
Massimo Bevilacqua, modified 6 Years ago.

RE: Resource importer Images

Regular Member Posts: 210 Join Date: 12/27/16 Recent Posts
Hi Olaf,

thank you for your reply.

I just add this to my article
<p><img alt="" src="[$FILE=avatar.png$]"></p>


And then it will be parser by liferay and it create the URL, I can't modifiy it
thumbnail
Massimo Bevilacqua, modified 6 Years ago.

RE: Resource importer Images (Answer)

Regular Member Posts: 210 Join Date: 12/27/16 Recent Posts
I solved it by setting

resources-importer-developer-mode-enabled=false


in liferay-plugin-package.properties
thumbnail
Aravinth Kumar, modified 3 Years ago.

RE: Resource importer Images

Regular Member Posts: 152 Join Date: 6/26/13 Recent Posts
Hi All,
Regarding liferay theme resource importer, For normal basic web content type, we are importing image by placing the image in document_library folder and call it in article xml file as
<p><img alt="" src="[$FILE=avatar.png$]"></p> 
and its works as expected. 
How can we call the images in our custom created structures. For ex we have a structure with a field as image type.  Thanks in Advance.
&nbsp;&nbsp; &nbsp;<dynamic-element name="Image" type="image" index-type="text" instance-id="jimj">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dynamic-content language-id="fr_FR"> [b]---How to Call here --[/b] </dynamic-content>
&nbsp;&nbsp; &nbsp;</dynamic-element>