If the element will be displayed without any animation there is no need hide & show it instantly.

Hiding and showing it again instantly creates a small visual flicker on slow devices. As the image should be already be loaded in the background, I can't see any reason why it is necessary to hide & show it while setting it's src.