Optical camera communication (OCC) represents a subset of visible light communication with considerable potential applications in domains such as intelligent transportation systems. However, many related studies on OCC ignore the effect of image compression. Cameras typically compress captured image data to reduce the resources required to store the data. Taking Joint Photographic Experts Group (JPEG) and AV1 image file format (AVIF) compression as examples, the effect is studied based on a simplified OCC model. The simulation results indicate that image compression can achieve the effect of a low-pass filter. Image compression, especially AVIF compression, can effectively reduce the bit error ratio (BER) of the system. Compared with demodulating RAW images, the BER is reduced from 1.2×10−1 to 7.0×10−4 when the AVIF image compression ratio is approximately 140. In addition, image compression is one of the reasons for the different performance of the red, green, and blue channels.