convert temp.png -compress lzw eps2:temp.eps
convert temp.jpg -compress jpeg eps2:temp.eps
The convert command comes from the imagemagick package available on Mac, Windows, Linux, and iOS.
If you type only convert temp.png temp.eps, it's gonna create the EPS file without compression, creating a huge file.