Double preview icon due to same photo filenames in different maps

double previews and goes to wrong photo

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 22.0.0
Operating system and version (eg, Ubuntu 20.04): 20.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.18.0
PHP version (eg, 7.4): 7.4

The issue you are facing:

Duplicate preview icons.
The wrong photo shows up when I click on the preview icon.

I have multiple folders that happen to contain photos with the same file name.
Then when I click on the preview icon photo I get to see a wrong photo. One that is in a different folder.
I also see several of the same preview icon pictures.
I already deleted the preview folder once but that didn’t help. And sudo -u www-data php /usr/share/nginx/nextcloud/occ maintenance:repair doesn’t help either.
Can’t the photo app see that it’s a photos with the same name but in a different folder?
Renaming is not an option, way too much work and not convenient because you keep running into this.