Cloudflare mirage hiding my image

When I finished writing my Laravel code, I pushed the codes to the server. I realized all my images dissapeared. I checked the code using inspect element, all the image tag have style “visibility:hidden; display:none”, however, this does not appear in the code I write. Weird, something is adding these styles to my image. I realized that there is a data-cfsrc attibute at the image, so I googled. This is caused by Cloudflare mirage, a service that hides the image when the image is outside of viewport to save bandwidth. Somehow, Cloudflare thought my image are out of the viewport! So, I use JQuery to remove the attributes hiding my image.

Leave a Reply