Buffer an image

I would like to take a snapshot, buffer it, then send it if an other condition is reached. Example: take snapshot on linecrossing alarm of camera, then send that image if somebody presses the doorbell or if an alarm condition is met (door contact/motion/etc).
Until now I have been unsuccessful using the imagegrabber app. When I use the “send image” card of pushover using the tag of the image acquired earlier by imagegrabber, a new snapshot is made and send.
Anyone a good idea how I would realize that, if it is possible anyway. (Asked the same question in the “image grabber app” topic, without any reply :slight_smile: )