Fix upload and download images