Hi, Davier:
Since version 1.3.1 it is doable by means of API functions, but also, one could do it manually by using shapes for assigning source photo for each... possible but cumbersome.
I can't help with programming the script, but I'm 100% sure it is something that someone has done before.
Best regards.
GEOBIT