Dear student,
The direction of image is taken to be positive if the image is formed in the discretion of the ray of light (conventionally, on the right side of the mirror/lens). For lens, real and inverted images are ususally formed on the right side of the lens and hence is taken to be positive. But for the mirror the case is not so.
Regards