The paper relates to a method for effective reduction of artifacts, caused by lossy compression algorithms based on block-based discreet cosine transform (DCT) coding, known as JPEG coding. Most common artifacts produced by such type of coding, are blocking and ringing artifacts. To reduce the effect of coding artifacts caused by significant information loss, a variety of different algorithms and methods has been suggested. However, the majority of solutions propose to process all blocks in the image, which leads to increase of processing time, required resources, as well as image over-blurring after processing of blocks, not affected by blocking artifacts. Techniques for ringing artifact detection usually rely on edge-detection step, a complicated and versatile procedure with unknown optimal parameters. In this paper we describe very effective procedures for detection of artifacts, and their subsequent correction. This approach helps to save notable amount of computational resources, since not all the blocks are involved in correction procedures. Detection steps are performed in frequency domain, using only DCT coefficients of an image. Numerous examples have been analyzed and compared with the existent solutions, and results prove the effectiveness of proposed technique.