Expected ("jpeg" | "png" | "gif" | "webp") | { from_path: string; }, but was string