Sometimes gallery preview is not loading in the editor and you may see this infinite loading screen:
We noticed, that this can happen when postMessage is being blocked in the browser. There could be multiple reasons for that but in some cases, we found that the RocketLoader extension within Cloudflare was the reason. We are using the iframe-resizer library to control the preview iframe.
There are 2 possible solutions
Add Page Rule in Cloudflare
You can disable Cloudflare on the specific URL, which we are using for preview. Follow these steps:
- Open the Cloudflare Rules settings
- Click on Create Page Rule button
- Add this URL to the input
visualportfolio.co/?vp_preview=vp_preview*, and change the
visualportfolio.coto your site URL
- Then select the Rocket Loader setting and disable toggle:
- Click on Save and Deploy button
Deploying changes to your site may take some time (1-2 minutes), after this, you can check your gallery’s previews in editor.
Disable Rocket Loader Completely
- Open the Cloudflare Speed → Optimization settings
- Disable Rocket Loader setting