The solution was quite simple.
$('body').on('contextmenu','img',function(){ var imgid = $(this).attr('id'); alert(imgid); })
Using jquery to track clicks on an image, we can store its id in a global variable. Then, inside the plugin command, take the previously saved identifier.
Vgrain
source share