Well, I’m sure that you are definitely curious about how do you do this. Let me tell you this, it’s really simple.
Pre-requisites:

Image File(any format will do or even any file will do)
Linux(I’ve only tested it on this platform but I guess Mac would also do)

Let’s get started, shall we?
First create a standard loopback device.
dd if=/dev/zero [...]