analyze images when they are saved