refacto image tranfo api