avoid twitter errors when uploading images