2

I have tried various ways of making an action open on image on my Mac but no image shows up when the point is clicked. The best I got was when I made the field with the file path a "Photo" type. If I open the Attribute table, I can see a little thumbnail of the image. But I want to open the actual image in Preview.

I tried making the field type a "File Name" and assigning an "Open" action. This resulted in absolutely nothing happening when the point was clicked. I also tried making the field type a "Text Edit" and making the Action Type "Mac" and the Action open [%File Name%]. Again nothing happened. I checked on "Capture Output" and when I click a point, a box opens that says: Starting open '[%File Name%]'...

Done ... but alas nothing opens. I tested the command in terminal and it opens the image.

I thought maybe it had to do with the absolute file path since the images are on an external hard drive at /Volumes/external-drive/images/2018_10_24.jpg. So I copied one to my current folder and changed the command to another column that just lists the individual file without the full path. Still nothing. I even unplugged the external hard drive to see if it gave an error when I ran the above action... same dialogue box with no image opening.

The tutorials on this seem so easy and straight forward, what am I missing here? Is there a permission I need to set on QGIS to let it run shell commands or something?

2

And, of course, the devil is in the details. Here is the correct open command, due to the fact that my column label has a space in it:

open [%"File Name"%]

It had to have double quotes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.