Announcement

#1 2019-06-17 16:02:50

tjerram
Member
2019-06-17
2

Image Location

Hello/Hi/Greetings,

I am new to Piwigo and installed it on an Odroid HC2 in a docker.  All my photos are already on the Hard disk  My question is when I add a photo to Piwigo is there another copy of the image added to the hard drive somewhere Or does Piwigo simply store a reference to the images location in the database?

If it is storing another copy of the image where is it located and is there some way to prevent this.

Piwigo version:
PHP version:
MySQL version:
Piwigo URL: http://

Offline

 

#2 2019-06-17 21:07:47

kos
Member
2019-06-12
10

Re: Image Location

Create a symlink in your Piwigo folder to the directory where your pictures are stored.
Create a site in Tools > Site Manager directing to the symlink you just created.
Doing it that way, Piwigo does not store your pictures elsewhere (I think).

Offline

 

#3 2019-06-18 03:20:40

tjerram
Member
2019-06-17
2

Re: Image Location

Thanks for the info that is what I was hoping.  Can you tell me how (and where) to create a symlink.

Thanks

Offline

 

#4 2019-06-18 07:16:22

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Image Location

When you add (upload) an image to Piwigo. Piwigo stores the orginal image under upload (can be changed by configuration) directory. That path is stored in the database.
I'm not sure I gave you the answer you hopped.

Offline

 

#5 2019-06-18 22:45:38

kos
Member
2019-06-12
10

Re: Image Location

I'm not a Linux expert, so I took the easy way and created the symlink via WinSCP.
So this is what I did:
- create a folder 'galleries' on a share on my NAS
- connect to my NAS via WinSCP
- navigated within WinSCP to the folder where Piwigo is installed, right click and select New > Link
- fill in the name of the link (I used 'galleries') and the path towards the folder you created earlier
- in Piwigo I configured the symlink as 'site'

now whenever I add a folder with pictures in the folder 'galleries' on my NAS and start the sync in Piwigo, it will add that folder as a new album

Offline

 

#6 2020-01-25 02:06:04

Rust
Member
2020-01-24
28

Re: Image Location

@kos, I don't quite understand this. And maybe it's too many months ago to ask for an update. But I am struggling to understand what a symlink looks like in a non-Linux context (Windows), where it sits, and how it works. So I'd be very grateful for some more explanation!

I'm looking at my NAS using WinSCP, and am not sure which field you are using for each part.
Top field seems to be for a label. Bottom field is for a path? Is it the path to the folder with photos in it? What might that path look like? \\path\to\photos? Or something else?


And after that, where are you using this link? In WinSCP, in Piwigo, or in your NAS management console?
Does this link sit in the Piwigo galleries folder, or somehwere else?
Is Piwigo meant to parse it automatically and add photo details to the database?

Last edited by Rust (2020-01-25 03:28:07)

Offline

 

#7 2020-01-25 10:52:13

Rust
Member
2020-01-24
28

Re: Image Location

Using puTTY to make a symbolic link is straightforward, but Piwigo does not recognise the result.

I've got puTTY on the same LAN as the NAS, so I log in to the NAS web directory via local IP (192.168.n.n).
Once I've connected, I create a symbolic link using the ln command and the -s switch.
I navigate to the destination folder (piwigo/) so that the link is created in that folder.

root@NAS://volume1/web/piwigo$ ln -s //volume1/photo/Annual/ //volume1/web/piwigo

There is now a 'folder' named Annual in my Piwigo directory.

So that part works. But Piwigo does not recognise the symlink for synchronisation.

In the Site Manager Directory, I now have a link called ./Annual/ that points to

http://192.168.n.n/piwigo/Annual/

When I click on the Synchronise action, I get 0 in all the result categories.

So it looks as though the link is not pointing to the right place, or that it's not the kind of link that Piwigo needs.



Piwigo 2.10.1
Operating system: Linux
PHP: 7.2.24
MySQL: 5.5.5-10.3.21-MariaDB
Graphics Library: External ImageMagick 6.9.10-27

Last edited by Rust (2020-01-25 10:52:42)

Offline

 

#8 2020-01-25 12:52:49

Rust
Member
2020-01-24
28

Re: Image Location

Further checking shows that the symlink works. So it is some other issue to do with Piwigo itself.

In puTTY:

root@NAS:/$ cd //volume1/web/piwigo/Annual/
root@NAS://volume1/web/piwigo/Annual$ pwd
//volume1/web/piwigo/Annual
root@NAS://volume1/web/piwigo/Annual$ ls
2019  2020  @eaDir  Thumbs.db

I have created a symlink called Annual. Using puTTY I can follow that link. When I list the contents of the 'directory', it shows the two folders 2019 and 2020 that reside on the Annual directory in my NAS.

So the symlink works for puTTY. But when I try to synchronise it using the Piwigo Site Manager, I get no results.

Offline

 

#9 2020-01-30 00:31:58

Rust
Member
2020-01-24
28

Re: Image Location

It's not storing a copy. So there would be nothing to prevent.

Offline

 

#10 2020-02-05 23:54:41

erAck
Only trying to help
2015-09-06
2021

Re: Image Location

Rust wrote:

I navigate to the destination folder (piwigo/) so that the link is created in that folder.

That's not where it is supposed to reside (unless you screwed the site manager's directory). Place the link in Piwigo's ./galleries/ directory, if that is what is configured under Admin -> Tools -> Site manager. So, make sure the /volume1/web/piwigo/galleries/ directory exists and then

Code:

ln -s /volume1/photo/Annual /volume1/web/piwigo/galleries/

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

Offline

 

#11 2020-02-06 00:01:12

Rust
Member
2020-01-24
28

Re: Image Location

Thanks for that clarification, erAck.

I've done a variety of things like that since posting this, and find that Synology just doesn't recognise symbolic links. So even though the link is in the correct directory, Piwigo cannot use it, because the Synology *nix isn't set up to recognise symlinks.

So that's the end of the line for Piwigo and self-hosting on a Synology DiskStation. A dead end.

Offline

 

Board footer

Powered by FluxBB

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