I would like a "button" which I could "click on" that would on first click insert a specific photo from a windows file and then, on second click, remove the photo. It could also be two buttons. Or some other scheme. Any thoughts?
img = Nothing; Button["Click", If[ ImageQ@img, img = Nothing, f = SystemDialogInput["FileOpen"]; img = Import[f]]; , Method -> "Queued"] Dynamic[If[ImageQ@img, img]]
This button will check if
img is an image, if not it will call the file dialog, import the selected file, and display it - you could change
f to a fixed filepath if you don't want the dialog. The
Method parameter is set to "Queued" to allow the dialog. If
img is an image it will reinitialize