Let $f: X \rightarrow Y$ be a morphism of schemes, where $Y = \text{spec}A$ is affine. Let $\mathcal{L}$ be an invertible sheaf on $X$. Is it true that the direct image functor $f_{*}$ respects arbitrary direct sums in the sense that, $$ f_{*} \bigoplus_{d \geq 0} \mathcal{L}^{\otimes d} \simeq \bigoplus_{d \geq 0} f_{*} \mathcal{L}^{\otimes d} $$
Are there any conditions on $f$ that would make this true?