Debugged image upload