As of right now, there is no way to buy IMX directly on Coinbase. However, there are a few indirect ways that you can do so.
The first way is to use a service like Changelly or Shapeshift. These services allow you to convert one cryptocurrency into another.
So, you could convert your ETH or BTC into IMX using one of these services.
Another way to buy IMX would be to find someone who is selling it and make a trade with them. You could use a service like LocalBitcoins or Paxful to find someone who is willing to trade with you.
Finally, you could also mine for IMX yourself. However, this would require quite a bit of expensive hardware and electricity.
It is not recommended for most people.
So, as of right now, the only ways to buy IMX are through a service like Changelly or Shapeshift, finding someone who is selling it, or mining it yourself.