What are the advantages for a receiver that uses an IF compared to direct conversion?

A superhet has two distinct properties, which may or may not be advantages:

  1. The image frequency is far away, and
  2. The IF is not DC

In a typical superhet design, the LO and signal frequencies will be quite far apart, making the image frequency in an entirely different band. Thus it's not difficult to exclude the image frequency with a simple analog filter.

In a direct conversion receiver, the LO is at or very near the signal frequency, and thus the image frequency is immediately adjacent. Obtaining a sufficiently selective filter at the signal frequency is often impractical: it would require a very small fractional bandwidth, and would need to be tunable over the operating band of the receiver. Contrast with a superhet design which allows the channel filter to be tuned at just one frequency: the IF.

Thus, a direct conversion receiver must typically perform channel selection after the mixer, typically with a quadrature mixer. Dealing with quadrature signals in the analog domain requires more circuitry since there are twice as many signals to process, which must each be treated carefully to maintain coherence. Furthermore, it is difficult to minimize DC offset and 60 or 50 Hz hum.

These issues are largely mitigated in modern times by digital electronics. Many (perhaps most?) modern HF amateur rigs now utilize either direct sampling (example: Icom IC-7300, FlexRadio, Hermes), running an ADC fast enough to sample RF with no mixing at all, or direct conversion with a quadrature mixer (example: Softrock, QRP Labs QCX, everything from Elecraft).

Modern VHF+ applications tend to use direct conversion and digital demodulation as well. For examples, consider the ubiquitous, cheap RTL-SDR receivers, and BaoFeng handhelds.

Often, the digital solution not only performs better but is cheaper too, especially when the modulation in question is a digital one that already requires digital hardware. So arguably, there is not much modern advantage to a superhet design, except possibly cost when a very simple analog demodulation circuit is possible, for example AM.