The answer is yes and holds for the more general case that $E$ is any connected space. We prove this by proving the equivalent (contrapositive):
Let $f: X \rightarrow Y$ be continuous. If $f(X)$ is disconnected, then $X$ is disconnected.
Suppose that $f(X) = A \cup B$ is a separation, i.e. $A, B \subset f(X)$ is open, $A, B \neq \varnothing, A \cap B = \varnothing, A \cup B = f(X)$.
Let $C = f^{-1}(A), D = f^{-1}(B)$. Then $C, D \neq \varnothing, C \cap D = \varnothing$.
Write $A = f(X) \cap U$, where $U \subset Y$ is open.
Then $C = f^{-1}(A) = f^{-1}(U)$ is open, since $f$ is continuous.
Similarly, $D$ is open, and hence $X$ is disconnected.