I'm using QGIS 3.4. print layout to create an atlas with photos of features. I have a folder with photos and each photo is named with an ID of related feature.
Example: If ID of feature is 543, photo is named "543.JPG"
I'm using an expression to define a path to photo:
concat('C:/Users/user/Desktop/Photos/', "id" ,'.JPG')
This works fine, but sometimes the photo of a feature is missing in folder and then I get a huge red X instead of a photo.
Is there a way to exclude the picture from rendering if it is not found in folder?
I found an example (link here) that uses "data defined override", but it requires the features to have an attribute "image path" and uses it to determine if the image will be rendered or not based on existence of that value. I don't have image path in my data, i just use feature ID to get the photo.