  To explore the possible clues for the extra dimension from the Event Horizon
Telescope (EHT) observations, we study the shadow of the rotating 5D black
string in General Relativity (GR). Instead of investigating the shadow in the
effective 4D theory, we concern the motion of photons along the extra dimension
$z$ with a conserved momentum $P_z$, which appears as an effective mass in the
geodesic equations of photons. The existence of $P_z$ enlarges the photon
regions and the shadow of the rotating 5D black string while it has slight
impact on the distortion. The EHT observations of M87* and SgrA* can rule out
the black string model with an infinite length along the extra dimension, and
support the hypothesis that the extra dimension is compact to avoid the
Gregory-Laflamme (GL) instability, where the length of the black string/the
compact extra dimension can be constrained as $2.03125~\rm{mm} \lesssim \ell
\lesssim 2.6~\rm{mm}$ and $2.28070~\rm{mm} \lesssim \ell \lesssim 2.6~\rm{mm}$
respectively.
