Announcement

#1 2021-03-28 13:02:04

tommi
Member
a galaxy far, far away
2021-01-07
13

Embedding images and galleries in HTML (Static website)

Hello everybody, I have a Jekyll static website hosted on Netlify. I would like to embed some pictures I have in my Piwigo gallery, but the problem is that I have no idea what URL to use as "src"
. I tried to look at the APIs, but honestly hey are quite confused and I do not really understand. Could you point me to a guide/tutorial or at least give me some basic insights to figure this out? I see that with a Wordpress blog it is extremely easy, but what I need is something I can embed in HTML, even a mere link to the image would be great!

Piwigo URL: https://images.tommi.space

Thank you very much!

Best,
T

Last edited by tommi (2021-03-28 13:03:03)

Offline

 

#2 2021-03-28 14:21:03

erAck
Only trying to help
2015-09-06
2035

Re: Embedding images and galleries in HTML (Static website)

As image URI the download link without the download parameter can be used, for example for your first desk logging 2020.11.30 Desk - 1
https://images.tommi.space/picture?/161 … 01130-desk
the XS download link is
https://images.tommi.space/plugins/down … ize=xsmall
for which removing download and an ampersand leaves
https://images.tommi.space/plugins/down … ize=xsmall

You might also be interested in https://github.com/moy/piwigo-random that uses the API to obtain pictures of a category and picks at random.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-03-28 15:57:05

tommi
Member
a galaxy far, far away
2021-01-07
13

Re: Embedding images and galleries in HTML (Static website)

Thanks a lot! A few questions, though:
1. Such images are readily available to be used or they are parsed and rendered (resized) by the server every time a request is sent?
2. Is there a way to embed galleries?
3. What is the

Code:

part=e

in the link?
4. Could you be so kind to provide a reference/wiki for the API links composition?

Thanks a lot, again!

Have a nice sunday,
T

Offline

 

#4 2021-03-28 17:31:03

erAck
Only trying to help
2015-09-06
2035

Re: Embedding images and galleries in HTML (Static website)

1. no idea how that is handled for the download_by_size plugin and whether its generated sizes are cached or not, I don't use it myself.
2. I don't know.
3. part=e obtains the element (file), part=r would obtain the representative; see the plugin's action.php. The non-plugin case would know part=f for other formats as well; see the Piwigo action.php
4. see your own installation :p https://images.tommi.space/tools/ws.htm


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact