Is imagining sex while unmarried will be considered zina?
No, it is a different sin which is much smaller and is an act of shamfulness.
Allah commands justice, the doing of good, and liberty to kith and kin, and He forbids all shameful deeds, and injustice and rebellion: He instructs you, that ye may receive admonition. (16:90)
But if you can control your desires there is great reward mentioned in the Quran for this:
And for such as had entertained the fear of standing before their Lord's (tribunal) and had restrained (their) soul from lower Desires, (79:40) Their Abode will be the Garden. (79:41)