Learn how configure Cloudflare Mirage.
4. Mirage acts as a lazy loader and automatically turns all images into load-on-demand. Images on your site, including images from third party links, are not loaded until your site's visitor scrolls to their location.
Read our blog post for more information on Mirage.
Image formats compatible with Mirage
Mirage will work with the following image formats:
To enable Mirage image optimization for your domain,
- Log in to your Cloudflare account.
- Navigate to the Speed tab.
- Click the Optimization tab.
- Scroll down to the Optimized Delivery section.
- Toggle the Mirage switch to On. type: embedded-entry-inline id: 558IVj3yx8rXLOPTHqBGls
Once Mirage is enabled, you can use Cloudflare Page Rules to apply Mirage to specific pages or URLs on your site. To access and configure your page rules, go to the Rules > Page Rules in the Cloudflare dashboard.
Mirage's features for Mobile Browser optimization are triggered based on high latency and poor network connections. You can test Mirage by making a request to your domain using a mobile user-agent string and one of the following flags with your domain in your mobile browser:
To run the pre-loader only and serve degraded images on the page enter:
Here is an example where Mirage 2 is triggered by a
?forcepreloadonly flag. The notable image degradation is a sign that Mirage is working: