Images are not indexed at Android OS level

I’m running two Google Pixels, syncing camera pictures into a custom folder (not DCIM). While the files are available when I browse to the destination folder, they’re not indexed as images within the OS. I don’t really know how this indexing process works, but it allows other apps such as File Manager + and Google Photos to discover these pictures and the folders that contain them. e.g. File Manager + has an Images folder, and Google Photos has a listing of these folders under Back up device folders.

I confirmed that Syncthing is the issue because I can manually copy/paste one of these picture files within the same folder and it’ll become indexed.

Has anyone run into this issue? Any help would be appreciated.

What happens if you manually rescan the folder in Syncthing? We’ve had similar issues with Syncthing being unable to automatically detect new pictures, but they were still detected when a full folder rescan was performed. Can you also try using another camera app (e.g. Open Camera) and see what happens when you take a picture with it?

1 Like

Syncthing doesn’t use standard android apis for file creation, so the os doesn’t know the files are there.

Syncthing is written in go, not java and hence access to such apis is not available.

The wrapper tries to notify the os, but thats probably not bullet proof/has bugs/rotted with android apis changing.

1 Like

I played around with folder rescan and Open Camera. Maybe I’m losing my mind, but it looked like both options worked once, but neither one works at the moment :frowning: I’m thinking maybe my solution will be to use some utility to rewrite the file, I’m just not sure which yet :thinking: Alternatively I could try to trigger the indexing event directly, but I don’t know where to even start on that.

Just a quick update. I abandoned Syncthing, in favor of SFTP - “SSH Server” app on server phone, and “Folder Sync” on client phone. It was super easy to set up, and best part is I only had to forward one port on my router and I get super fast connection (also using DDNS to my my home network easy to discover, but that was easy to do with my Asus router as well).

Here’s the more relevant part to this thread. SSH Server doesn’t index the media files after saving them …BUT… “Folder Sync” has an advanced option called Re-scan media library that you can find under Advanced settings: Settings - FolderSync Documentation. When checked, it updates the OS about the new files and they show up in Google Photos backup folder.

Of course it doesn’t work across the network, so I had to also install Folder Sync on the server phone, which syncs the pictures into another local folder once SSH Server receives them from my client phone. Yes, it’s a hacky setup, but that’s the best I can do for now. I’ve asked the developer of SSH Server to add this Media Scan functionality, and I think it’d be a good idea for SyncThing devs to add it as well, for their Android users.

FYI, this functionality is available in the Folder Sync app under "Re-scan media library " as you can see under Advanced settings: Settings - FolderSync Documentation When checked, picture files appear in Google Photos backup folder after they’re copied.

Is it possible for SyncThing to trigger the same operation to rescan media files on the destination folder?

It already does that: