Is it possible to store images on variables?

The variables are text values, so you could Base64 encode, and then decode when you need them.

(See the base64 ‘execute shell script’ example here: Find Image on Screen using Clipboard Image? )

Update - forgive me - that link was already posted …