I'd like to make a fallback when displaying pictures out of a notes database. The notes database normally contains a pdf and a jpg version with the same name (except the extension) If the jpg picture exists I would like to display it , if not I would like to display the pdf using google drive
return "<embed src='https://drive.google.com/viewerng/viewer?embedded=true&url=https://demourl.pdf' width='500' height='375'></embed>"
So the question is : what's the best way to test if a picture exists in a notes document