In recent years, quantum image processing got a lot of attention in the field of image processing due to the opportunity to place huge image data in quantum Hilbert space. Hilbert space or Euclidean space has infinite dimensions to locate and process the image data faster. Moreover, several types of research show that the computational time of the quantum process is faster than classical computers. Encoding and compressing the image in the quantum domain is still a challenging issue. From the literature survey, we have proposed a DCT-EFRQI (Direct Cosine Transform Efficient Flexible Representation of Quantum Image) algorithm to represent and compress gray image efficiently which save computational time and minimize the complexity of preparation. This work aims to represent and compress various gray image sizes in quantum computers using the DCT (Discrete Cosine Transform) and EFRQI (Efficient Flexible Representation of Quantum Image) approaches together. The Quirk simulation tool is used to design the corresponding quantum image circuit. Due to the limitation of qubits, a total of 16 numbers of qubits is used to represent the coefficient and its position of the grayscale image. Among those, 8 number of qubits are used to map the coefficient values and the rest are used to generate the corresponding coefficient XY-coordinate position. Theoretical analysis and experimental results show that the proposed DCT-EFRQI scheme provides better representation and compression compared to DCT-GQIR, DWT-GQIR, and DWT-EFRQI in terms of PSNR(Peak Signal to Noise Ratio), and bit rate.