Do I need to root ( unlock boot loader) to flash Factory image for Nexus 5 Do I need to unlock boot loader to flash official factory image of Android L Preview ? And will it void warranty? Is it rooting the phone ? I have never rooted phone before and I don't wish to do so. Please provide useful link on how to flash such images.
Yes you need to unlock the bootloader to flash the factory image.

Yes it will void your warranty but you can lock your bootloader again and reset the tamper flag to get the warranty back

No unlocking bootloader is not rooting. 

Here is the useful link.


Unlocking bootloader
Flashing factory image