This is possible, but not an easy task. You'll need some script that will analyze the shape of the image and will build a collision polygon for it. Then you'll need the Polygon addon to load that polygon into a sprite.
If the images are something simple, like Tetris shapes, there may be easier ways to do this.