I was thinking that, since the JPEG compression algorithm is a real-coefficients-only FFT (ie cosine transform), followed by removal of most except the most significant coefficients, the JPEG compression already functions as a digital lowpass filter that suppresses high frequency noise.
However, FFT-frequency-based filtering schemes suffer from ringing artefacts in the time-domain. This is smoothed out by applying some kind of smoothing at the cutoff in the frequency domain, such as the endpoints of a Hanning or some other sampling window. So something like this can (very likely, like most good ideas, is already) implemented in the JPEG algorithm to smooth out the ringing artefacts.
Just a flash I had while stirring coffee.