How and where do you upload images on XML Galley?

Hi all
Using OJS3 and all going well… Playing around with XMLS Jats and finally getting somewhere. Just 2 points where I neede help:

-I can upload XML Jats doc in the Galley (HTML) and this will display very nicely with the Lens Viewer: how I can open the XML on separate Window/ Browser Tab?
-I have no idea how and where I can upload the images? the XML is organised in on single folder where the images are in sub directory…

Appreciate any help!

cheers

1 Like

Hi @Ted,

For your second query, see the link below, from post 65 onwards.

Regards,

Thanks!!!

Just tried that but no luck… I have a feeling something is wrong in the XML itself so trying to find an XML Jats document with associated jpeg file(s) to upload that and see if works.

Fingers crossed :slight_smile:

This his how you write code in XML for images: (atleast I do it and I am fine so far)

<fig id="fig3" position="float">
			<label>Fig 3: </label>
            <caption><title>Picture showing size of the calculus removed from left submandibular duct</title></caption>
            <graphic mimetype="image" xlink:href="125_3.jpg" xlink:type="simple" />
        </fig>

Regards.

Thanks… !
If you have an XML doc and corresponding figure, I would be eternally grateful if you could send those across so I can follow the process and see if all works as it should.
Hope you can help me out with this
Cheers

1 Like

Can you download this file?

You can name any image as the name of image in the xml file eg 125_1.jpg, 125_2.jpg, 125_3.jpg.

Hope this helps you.

As far as I remember Lens Viewer supports only absolute URLs for images. Think, only @ajnyga’s modifications added the support for images attached to the XML galleys.

@asmecher’s latest version should have it as well: pkp/pkp-lib#3038 Add image URL rewriting for dependent files · asmecher/lensGalley@7a32cbc · GitHub

(edit: have not tested)

Hi @Ted

@Vitaliy is right. I use @ajnyga’s LensViewer, so use relative links. This makes easy for an editor to upload files to to the galley.

If anyone does not use @ajnyga’s LensViewer, then they have to upload images to some folder in server and use absolute links. I think this is a relatively difficult option compared to first.

Tried with the XML file and uploaded a jpg file with name 125_1.jpg. Image is not showing up on the figures.
How would an absolute link look like?
Help:slight_smile:

Just one small question: what if I dont use LensViewer? how would I go about displaying a correctly formatted JATS file with the corrsponding images? Should I also load somekind of CSS file on the Galley??
Sorry to be a pain !!!

Absolule link would look like:
http(s)://yourdomail.com/index.php/ABCD/public/journal/1/yourFolder/image1.jpg
if you upload your images to public/journal/1/yourFolder folder. You can choose any folder you like but within public would be good because you would copy this folder when you upgrade later.

Actually speaking, there is no need of lensviewer if you use JatsParser plugin by @Vitaliy. This plugin will show your full article in “article landing page” i.e “abstract page”. You don’t need any css as well.

You see this page:
https://jlmc.edu.np/index.php/JLMC/article/view/139
Actually, it is abstract page but it shows the full text article as html. You may not need another html galley.

Hi @asmecher and @ajnyga, how can I update the changes of lens? I am not expert user and I think than the new version than @asmecher plubished solves my problem, because I can upload the xml files and images, but i can’t see the images from XML on the browser. but I see the xml, the tables, but never see the images. I think that the problem is the lens, because it can’t see the source for the images…can you help me ?
Thanks in advance, Jonatan.

Hi @JCar,

If I am correct,
Lens by @ajnyga can use relative links to the images. You need to write some image name in your xml file (eg image1.jpg). You should then, name the image as image1.jpg. In your production tab, under galley you upload your XML galley as XML (in my case, it is HTML). On the left of that galley file, you will get a small triangle. Click it and you get some menus (see fig below)

image

Now you need to click edit and upload your image1.jpg by clicking Upload File (see fig below)
image

But you cannot use relative links llike this if you do not use lens by @ajnyga.

Hope you find this useful.

Hi,

I think that @asmecher also added support for OJS artwork files to his version of the plugin? Not sure.

In generally I think that the lens plugin is not the optimal solution for rendering JATS XML, as @anupent mentions above. Google wont find the content and it is not mobile friendly.

Hi @anupent, thanks for the answer but it isn´t the problem.
I Can upload the XML and pictures the same than you show me in the picture, but I can see the images in the XML view. When I check the file on the folder web, it is in the same route and has the correct name and route in the xml. I don´t know why never I can’t see. I’m thinking about I need to update the lens galley. How can I find the correct solutions for rendering JATS XML @anupent @ajnyga @asmecher.
thanks for all,
Jonatan

If you use jatsParser plugin or oldGregg theme, they support JATS XML. In each of these cases, full article will be displayed in the abstract page. There is no need of Lens.

Both these are by @Vitaliy.

1 Like

HI,

I’ve upload the xml files and also the images, but I cant figure out why they arent displayed once you open de xml. Is there any alteration that needs to be done in the xml to conform with the images uploaded in OJS?
We receive the articles marked altready.

Thanks a lot

I have the same problem… October 2018

Hi @thaysecantanhede and @lsteele,

See Html articles do not display images - #3 by asmecher.

Regards,
Alec Smecher
Public Knowledge Project Team