  We solve the problem of polaron localization on an attractive impurity by
means of direct-space Diagrammatic Monte Carlo implemented for the system in
the thermodynamic limit. In particular we determine the ground state phase
diagram in dependence on the electron-phonon coupling and impurity potential
strength for the whole phonon frequency range. Including the quantum phonon
dynamics we find and characterize a new phase which is missing in the zero
phonon-frequency limit (adiabatic approximation), where self-trapped polarons
are not localized at shallow impurities. We predict and show that in the
vicinity of the localization transition a region with a mixture of weak- and
strong-coupling spectral response is realized.
