The following seems like an extremely basic algebraic topology question, but it's not something I ever learned, nor does it look familiar to the algebraic topologists I've asked.



> 
> Let $f:X\to Y$ be a map, inducing $f^\*:H^\*(Y)\to H^\*(X)$. Hence the image $R$ of $f^\*$ is a subring of $H^\*(X)$. Is there a natural way to factor $f$ as $X \to Z \to Y$, such that $f^\*$ factors as $H^\*(Y) \twoheadrightarrow R \hookrightarrow H^\*(X)?$
> 
> 
> 


I have a particular $X,Y$ in mind (the inclusion of one compact complex manifold into another, each with even-degree cohomology) but I'm hoping phrases like "Postnikov tower", "cofibrant replacement", "mapping cone" will serve to give a general answer.



Image of a map on cohomology rings
No. Consider the Hopf map $\eta:S^3\to S^2$. If there were such a space $Z$, it would have $\widetilde H^\*(Z)=0$, so at the very least $Z$ would be stably trivial, forcing $\eta$ to be stably trivial; but it’s not. 


