We propose a conditional median filter that is able to preserve significantly more image detail than the conventional median filter when suppression of impulsive noise is desired. It does so by means of bypassing filtering when the local signal variation is below an adaptively adjusted threshold. Another advantage of our algorithm is that it is simple to implement and it can be used with any of the available fast median filter algorithms. In addition, it can be easily integrated into existing median filter hardware. We compare the complexity of our algorithm with that of another proposed algorithm with similar filtering objectives. The performance of the new algorithm on real images is compared to that of median and center-weighted median filters.