[OJS:] The images do not load when viewing the XML

Subi XML together with the images to the OJS, but the images do not load when viewing the XML. check the error_log but no record is generated, any reason why this happens.


Información del servidor
Versión OJS:
Plataforma SO: Linux
Versión PHP: 5.5.21
Versión Apache: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips mod_auth_gssapi/1.5.1 mod_nss/1.0.14 NSS/3.28.4 PHP/5.5.21 mod_wsgi/3.4 Python/2.7.5
Driver de la base de datos: postgres
Versión del servidor de bases de datos PostgreSQL 9.2.24 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28), 64-bit

Have you uploaded the images as dependant file while adding xml galley?

1 Like


yes, I have uploaded the images as dependant file while adding xml galley.

the HTML was uploaded and it works, but the XML does not show the images.

HTML–> Vista de Restos apendiculares de un ictiosaurio oftalmosáurido del Barremiano inferior de Villa de Leiva, Colombia | Boletín de Geología


I have the same problem

please help i could not solve the problem

@kawahyu @asmecher

Hi @proyrevistas and @DiegoG,

What OJS version are you using?
How images are coded in XML? can you give an example of the content of fig element?
Are images attached as supplementary files to the XML?

Hi @Vitaliy

I’m using OJS and I have uploaded the images as supplementary files, here is an example of the fig tag content:

Figura 1 Diseño de filtro de macrófitas en flotación.

I’ve been researching a little about this matter, and I found in other post is because of LENS needs absolute URL for images, and it works, but I rather find a solution that doesn’t involve uploading archives outside the platform.

I found a fix for LENS, but it doesn’t work, maybe you know any working version of LENS that allows relative URL for images?



Just tested it on OJS 3.1.2-1 with the default Lens Viewer plugin and it worked for me. Code for figure:

<fig id="fig1">
		<title>Figure title</title>
	<graphic xlink:href="fig1.jpg"/>

Image with the filename fig1.jpg is attached as a dependent file.

Can you describe in more details how you upload an image and show the code for figures in JATS XML file?

<fig id="f1">
<label>Figura 1</label>
<title>Diseño de filtro de macrófitas en flotación.</title>
<graphic xlink:href="2422-4200-logos-12-01-00010-gf1.png"/>

I tried last time to show you the code, but it didn’t work.
When I uploaded de file I went to add galley, uploaded the xml file, and then I uploaded the images as dependant files.


What is the original filename of the image that you are trying to attach as a dependent file? What matters is that it should be the same as in XML, not the name that you are specifying in OJS.

The problem is not the name of the file. Actually, JatsParser plugin works ok, it shows the images, but if I switch to LENS, it doesn’t work

Yes, can confirm that this doesn’t work in 3.1.2-1 but works in 3.2.0

great! I think I can upgrade later, thank you very much