Given a locally finitely presentable category $\mathscr C$ and an object $X \in \mathscr C$, it is not so hard to show that a morphism $(X \to Y)$ is compact in $\mathscr C_{X/}$ if it can be obtained from a pushout square $$\begin{array}{ccc}X_0 & \to & Y_0 \\ \downarrow & & \downarrow \\ X & \to & Y\end{array}$$ with $X_0, Y_0 \in \mathscr C^\omega$. In algebraic situations (e.g. commutative rings), this is the only thing that can happen: descend all the generators and relations down to a finitely generated subobject.
Question. Is the same true in any locally finitely presentable category? Are there any natural 'smallness' restrictions on $\mathscr C^\omega$ that give a positive result?
(In general, I am only able to prove that a compact object is a retract of an object of the type above.)
I am particularly looking for references that treat this type of question, as I'm sure the answer to this is well-known (I'm trying not to reinvent the wheel for once...).