[ad_1]
Hello,
I’m sorry to hear you’re experiencing issues with media not displaying in the preview mode on your WordPress site. This can be a bit tricky to diagnose, but here are some steps to help you identify and hopefully resolve the issue:
- Check the Console for Errors: Open your browser’s developer tools (usually F12) and check the console tab while you’re on the preview page. Look for any errors related to loading resources like images. These errors can often provide clues about what’s going wrong.
- Disable Caching and Optimization Plugins Temporarily: Even though you’ve cleared the cache from WP Rocket, sometimes caching or optimization plugins can interfere with how content is loaded in the preview. Try deactivating WP Rocket and any other caching or optimization plugins, then check if the issue persists.
- File Permissions: Incorrect file permissions on your server might prevent images from loading properly in preview mode. Verify that the permissions for your
wp-content/uploadsdirectory are set correctly (usually, folders should be 755 and files 644). - Check .htaccess File: If your WordPress site uses a custom
.htaccessfile, it might contain rules that affect the loading of media files in preview mode. Look for any unusual rules or recent changes in the.htaccessfile. - Theme and Plugins Conflict Check: Sometimes, conflicts with your theme or other plugins can cause issues. Try switching to a default WordPress theme (like Twenty Twenty-One) and deactivating all plugins except the essentials. If this resolves the issue, reactivate your theme and plugins one by one to identify the culprit.
- WordPress and PHP Version: Ensure that your WordPress installation and PHP version are up to date. Incompatibilities between versions can sometimes cause unexpected issues.
- Server Configuration: If you’re on a managed WordPress hosting, reach out to your hosting provider’s support. They can often provide insights or identify issues specific to their server configurations.
- Media Files Path: Ensure that the file paths of the images are correct and accessible. Sometimes, the paths might be different between the live and preview versions due to settings or how URLs are rewritten.
- Check for HTTPS Issues: If your site is on HTTPS, ensure all resources are loaded over HTTPS as well. Mixed content (loading HTTP resources on an HTTPS site) can cause elements to not display.
If you’ve gone through these steps and the issue persists, it might be a more specific problem related to your site’s configuration, in which case, it could be beneficial to consult with a WordPress developer or your hosting provider for further assistance.
We found it was being caused by the EWWW Image Optimizer plugin trying to load from a CDN. I disabled this plugin and images loaded.
