Fixing timing for image upload