There are different ways of printing onto fabric using your home computer - but using mount spray is the way which I've had most success with.
Step 1: Spray Card With Mount Spray
Cut a piece of card slightly bigger than the size you would like your fabric to be - 1cm larger width and height. So if you want your fabric to be 30cm x 20cm, for example, cut the card 31cm x 21cm. This will allow you to trim it by 0.5cm on either side.
Spray card with mount spray all over, right up to the edges. It's important to use mount spray as its repositionable qualities mean you can peel your fabric off again easily.
Step 2: Smooth Fabric Over Card
Cut your piece of fabric is slightly bigger than the card. Make sure it's nice and flat - you may wish to iron it. Smooth it carefully over the sticky card. Make sure you get out as many wrinkles as possible.
Use fabric which is not too thick and which is not too textured.
Step 3: Trim Fabric and Card
Using a very sharp craft knife and a metal rule, trim both the fabric and the card by 0.5cm on each side. Make sure you press firmly and that you cut through both the card and fabric with one clean cut.
Step 4: Inspect Fabric
Your fabric should look nice and smooth with a well defined edge to it. Make sure there are no stray threads that could tangle it in your printer.
Step 5: Feed Into Printer
You are now ready to feed the fabric covered piece of card into your printer. Depending on what you're printing, you may need to increase the contrast and the brightness of a design, to compensate for the light fabric. You may want to experiment with which print setting produces the best results - such as 'plain paper' or 'photo paper'.
Carefully feed the fabric cover card in, and watch it as it feeds through the printer, to make sure it doesn't jam.
The finished fabric! As you can see, you can print on highly detailed images.
Depending on the ink you use in your printer, the images may or may not come off when you wash it. I use Lyson inks in my printer, so they are fairly robust. It helps if you iron them on the back with a high heat to fix the images.
If you like would like to print these images, you can find these, and other printable illustrations in my Etsy shop:
A note: I've had a few questions about whether this results in washable fabric. For me, the best solution has been to spray protector (such as you would use on canvas shoes/bags to waterproof them) on them, to repel stains and water. The items I'm making are mainly decorative, so for me, this works well.