Small and large polarons in nickelates, manganites, and cuprates