Implemented foreground image upload