Fixed Code to insert images