Removing deadspace

How do you get an image on a product with the dead space in the image reverting to the tshirt color as opposed to a black or white box

What image format do you use?
if png make the space transparent , if vector I don’t think you will have a problem.
I guess this can’t be done with format like jpg …