Moved Image determining function to GM