Init image upload code