Problem with loading images in OJS

Hello,

I am using OJS 3.2.0.1 locally in my machine with ubuntu 20. I’ve created a journal and I want to change layout as HTML layout. I prepare it my HTML file and I add it in Galleys with an image as dependant file. However, when I load the html file, the figure (image) won’t be shown:

The url of the image is overread by OJS in this way:
In HTML:
image
IN OJS:

@rcgillis @asmecher any suggestion please ?

Hi @anouar2002,

Please be patient. We are a small team can sometimes take us a little bit of time to get to your question. We will get to your question as soon as we are able to.

-Roger
PKP Team

Hi @rcgillis ,

Thanks for your reply. Sorry for the misunderstood, I tagged you in this topic not to get a quick response but to have a look on the question if you didn’t see it.
I will wait for answer, no worries.

Cheers,
Anouar

Hi @anouar2002,

Where is the image stored on your server? How was it uploaded?

-Roger
PKP Team

Hi @rcgillis,
Thanks for your answer.

I stored the image as depedant file of a HTML file added as Galley and I am using OJS locally on my machine.

Cheers,
Anouar

Hi @anouar2002,

Can you be more specific please and give me the specific full directory path that the image is in within your OJS instance?

-Roger
PKP Team

Hi @rcgillis ,
Sorry for the late reply due to time zone difference.
This is the full code of the html layout: layout - Pastebin.com

and in my OJS the file are added in this way:

But when I inspect them in the browser after publishing my article and click on their galley button, they have this url (for example for the figure):

Cheers,
Anouar

Hi @anouar2002,

I wonder if the spacing in the file names is creating a problem? Could you try renaming a file name with no spaces (e.g. anouar2002-table.png and see if that makes a difference?

-Roger
PKP Team

Hi @rcgillis ,

Thanks for your answer. I tried that but it still not working.

Cheers,
Anouar

Hi @anouar2002, the URL that you see in the browser is the correct one. OJS replaces the inline src attribute with a URL to the dependent file.

I’d recommend using your browser’s dev tools to inspect the Network Requests. Are you getting a 404 or 500 error when the browser tries to load the image?

1 Like

Hello @NateWr,
Thanks for trying to help me.

I inspected the network requests and I get a 404 error as shown in this figure:

Cheers,
Anouar

Hmm, it’s hard to say what might be causing the issue. However, 3.2.0.1 is very old now. It’s possible there is a bug in that version that has since been fixed. I recommend you upgrade locally to 3.3.0.4 or at the very least 3.2.1.4, then see if the problem is still occurring.