I have some trouble viewing pictures. I have worked on my database quite some time ago and I think the problem popped up after an update of Tropy. When I open my database, I can see a small version of all the pictures, but when I select a picture to open it in item view, I cannot see it and a warning sign is shown after the file name. I have tried selecting a bunch and scrolling through the photo list to consolidate the pictures, but that did not help. The warning sign disappeared for a moment but returned when I open the picture in item view. The path to the files on my computer is still intact. Can you help me solving this? I will add my log file to this post. Many thanks in advance!
What happens if you right click on a single photo in the photo panel (i.e., not on the item, but only a single photo) and consolidate it from there? If Tropy canât access the original it should prompt you to locate it on your hard drive. Could you try this and then, if it does not work, copy and post the log file one more time?
I tried this, but it does not help. I leads me to the original file on my hard drive, so that should not be the problem. Not sure if this is important, but there is also a warning sign in the ârightsâ section of the metadata panel. Should I change anything there?
So if you consolidate the single photo Tropy does prompt you to select the file again on your hard drive, is that right? The prompt only shows up if Tropy cannot access the photo anymore, so this is consistent with the warning sign and the photo not showing up in the item viewer. However, youâre saying the photo is still there at the same location, and if you select it again in the prompt, Tropy still does not update it?
Your project seems to be on a network drive; are the photos located on the same drive or are they local?
Could you try to enable âDeveloper Modeâ in the preferences and then open the devtools from the Developer menu in the project window: for each photo that canât be opened in the item view there should be an error message in the console there â could you check if those paths look correct?
The warning sign next to the rights field is unrelated to this (the rights field is marked as ârequiredâ by the default template, the warning sign is there because the field is empty).
No, it does not prompt me to select the file again when I consolidate, it just consolidates. The project is indeed on a network drive, but the photos are as well.
In the Developer Mode, it gives me the error message: Refused to load the image ââ because it violates the following Content Security Policy directive: âimg-src âselfâ data:â.
Thanks for your help!!
Thanks! This explains the issue then; weâve recently tightened the CSP so the image viewer refuses to display the files over the network. When you consolidate them, Tropy finds them with no problem, but then then when it tries to display them, thereâs a load error again because of the policy.
We will address this in the upcoming 1.7 release. Thereâs probably going to be a beta release at the end of this week which you could use until the release is ready. If you like I can also explain a workaround (youâd have to edit one file of your current installation).
Hi there, I was wondering whether this issue has been solved. I am working with pictures stored on the servers of my workplace and the warning sign is still there in the 1.8.0 version of Tropy (so I still cannot see the pictures in item view). I have tried consolidating the pictures, but that doesnât help. Does that mean it is not possible to use pictures stored on a network drive in Tropy? Thanks for helping me!
We loosened the security policy, but maybe this does not cover the way your drive is connected. Is this a Samba share or something different? Could you tell me the full path to one of the photos?
The photo thumbnails show up just fine, right? The load error only happens when you try to view the full size image?
Please enable developer mode in the preferences and then, in the project window, open the developer tools via the menu: there should be load errors or warnings with regard to the images that canât be displayed in the console tab â is that the case? If so, could you post a screenshot or copy one of the warnings?
Thanks for your quick response! The problem indeed occurs only when I try to view the full size image, I can see the thumbnails.
This is the path to one of the photos: file://cnas.ru.nl/U605171/Documents/Data%20collection/KHA/A23%20(Ernst%20Casimir)/30/IMG_3013.JPG. In the developer mode I get the following two tupes of errors:
Refused to connect to ââ because it violates the following Content Security Policy directive: âconnect-src http: https: âselfââ.
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/u605171/AppData/Local/tropy/app-1.8.0/resources/app.asar/res/views/index.js.map:
Thanks! This confirms that the security policy is indeed the issue. The protocol over which we try to access the file is file: which is the same as the application so I would have assumed that the âselfâ policy should cover it â but apparently not. I think the best thing to do is to try adding file: to the list explicitly.
If you donât want to wait for the 1.8.1 release (and help us know if this solves the issue!) I could create dev build for you to try out.
Yes, we will have to add it to the protocol explicitly (itâs only a single file that must be changed, but itâs deeply packed in an archive so itâs not straightforward for your to make the change yourself. I could give you instructions though, if youâre interested).
How did you add the photos to your project incidentally? Did you drag them over from somewhere or did you add them via the menu or the plus icon and the subsequent dialog?
Can you quickly verify that the URL to a picture works, e.g., if you put it into your browser?
I imported them via the menu. Iâm not working on a network but on a server, so I donât think my pictures have URLs? Sorry, I donât know anything about ICT.
What happens if you put, e.g., file://cnas.ru.nl/U605171/Documents/Data%20collection/KHA/A23%20(Ernst%20Casimir)/30/IMG_3013.JPG in the address bar of your browser? If this shows the picture, we know for sure that the file is accessible this way. I am pretty certain it is, because otherwise Tropy would not have been able to generate the thumbnails, but this would just confirm that the fileâs URL works and itâs âonlyâ the strict security policy which prohibits showing it.
Yes, the URLs work and show the pictures. I can still use Tropy for my notes, so the issue is not very pressing for me, but it would be great if you could keep this issue in mind in one of the new versions. Thanks again!