This is a follow up question to Weight filtration for smooth analytic manifolds

As mentioned in that question, the integral cohomology of some smooth complex analytic manifolds is equipped with a weight filtration. The construction generalizes Deligne's weight filtration on the rational cohomology of a smooth algebraic variety: we take a smooth complex analytic manifold and compactify it if we can as the complement of a normal crossing divisor and then take the Leray filtration (i.e. the filtration given by the Leray spectral sequence of the open embedding of the manifold into the compactification). This time we do not get an invariant but rather an invariant of an equivalence class of compactifications where two compactifications are called equivalent if one dominates the other.

The non-invariance is relatively easy to see: indeed, take a rank 2 vector bundle on an elliptic curve which is a nontrivial extension of the trivial bundle by itself. The bundle admits a section hence so does its projectivization; set $U$ to be the total space of the projectivization minus the section. One can show that $U$ is analytically isomorphic to $\mathbf{C}^\ast \times \mathbf{C}^\ast$. So $U$ has two different compactifications, one of which (a $\mathbf{P}^1$-bundle over an elliptic curve) gives weight 1 classes in $H^1$ and the other one -- $\mathbf{P}^1\times \mathbf{P}^1$ -- does not. See e.g. Peters-Steenbrink, Mixed Hodge Structures, p. 102.

The fact that we do get an invariant of the equivalence class of compactifications is a bit trickier but not massively so; I think I understand now how to prove it.

But still the question arises: does the weight filtration on the integral cohomology have any of the nice properties of the weight filtration on the rational cohomology of algebraic varieties? A particularly nice property is the strict compatibility with respect to the maps induced by morphisms of varieties. Recall that this means that if $f:X\to Y$ is a morphism and a class $x\in H^\ast(X,\mathbf{Q})$ of weight $i$ is in the image of $f^\ast$, then there is a class $y$ of weight $i$ that is mapped to $x$. My guess would be that this property breaks down even if one considers algebraic varieties, let alone analytic ones, but I can't find a counter-example.

So I would like to ask: is it possible to find smooth complex algebraic varieties $X$ and $Y$, a proper map $f:X\to Y$ and a class $x\in H^\ast(X,\mathbf{Z})$ which is in the image of $f^\ast$ but is not the image of any class of the same weight?

upd: in this question the weights are defined using algebraic compactifications; this does not depend on the particular compactification since for any two algebraic compactifications there is a third one that dominates them both.

integralcohomology. She then says that Deligne's theorem shows the existence a mixed Hodge structure on the integral cohomology of the complement $U$ of a normal divisor crossing, and adds that "One can show that this mixed Hodge structure depends only on $U$ and not on its compactification." This seems to contradict what you are saying. Did Voisin mean to define mixed Hodge structure as Deligne does, with a weight filtration defined on the rational cohomology? – JS Milne Jun 24 '10 at 23:35