International audienceMedian filtering enjoys its popularity as a widely adopted image denoising and smoothing tool. It is also used by anti-forensic researchers in helping disguise traces of other image processing operations, e.g., image resampling and JPEG compression. This paper proposes an image variational deconvolution framework for both quality enhancement and anti-forensics of median filtered (MF) images. The proposed optimization-based framework consists of a convolution term, a fidelity term with respect to the MF image, and a prior term. The first term is for the approximation of the median filtering process, using a convolution kernel. The second fidelity term keeps the processed image to some extent still close to the MF image, retaining some denoising or other image processing artifact hiding effects. Using the generalized Gaussian as the distribution model, the last image prior term regularizes the pixel value derivative of the obtained image so that its distribution resembles the original one. Our method can serve as an MF image quality enhancement technique, whose efficacy is validated by experiments conducted on MF images which have been previously “salt & pepper” noised. Using another parameter setting and with an additional pixel value perturbation procedure, the proposed method outperforms the state-of-the-art median filtering anti-forensics, with a better forensic undetectability against existing detectors as well as a higher visual quality of the processed image. Furthermore, the feasibility of concealing image resampling traces and JPEG blocking artifacts is demonstrated by experiments, using the proposed median filtering anti-forensic method