If f maps X to a subset I of Y, why not just say that its domain is I and do away with the distinction between domain and codomain? There are at least two cases where the distinction is useful\.
In this sentence I think you meant 'codomain' where you said 'domain' and 'image' where you said 'codomain'. Is that right?