-
Couldn't load subscription status.
- Fork 31
Description
Description
When using the Cloudinary WordPress plugin together with Crocoblock JetEngine, the Media Library “Edit Attachment” screen shows broken image URLs (/wp-content/uploads/...) instead of the expected Cloudinary URLs.
This only happens when JetEngine is active. After investigation with Crocoblock Support, the root cause seems to be that Cloudinary scans the entire admin page output for URLs. JetEngine adds inline SVGs via jet-engine/framework/jet-dashboard/jet-dashboard.php, and Cloudinary attempts to process these SVG references as if they were media files. When this fails, all Cloudinary URLs on the page “fall back” to local paths.
Steps to Reproduce
- Install the Cloudinary WordPress plugin and connect a Cloudinary account.
- Sync media so that attachments use Cloudinary URLs.
- Install and activate JetEngine.
- Go to Media → Library → List View and click on any image → Edit.
- The File URL field now shows a local
/wp-content/uploads/...path instead of the correctres.cloudinary.com/...URL. - The image preview also fails to load.
Expected Behavior
Cloudinary should continue to return the correct Cloudinary URL for the attachment, regardless of whether JetEngine is active or whether the page includes inline SVGs.
Actual Behavior
When JetEngine is active, Cloudinary falls back to local upload paths in the Media Library Edit view. Image previews break.
Additional Context
- Crocoblock Support confirmed JetEngine does not hook into
wp_get_attachment_urlor rewrite media URLs. - The issue is triggered by JetEngine’s dashboard styles, which insert inline SVGs (
content: url('data:image/svg+xml;base64,...')). - Removing these lines from JetEngine immediately fixes the issue.
- A temporary workaround is a custom shim plugin that restores Cloudinary URLs in the Admin area.
- WordPress 6.6.x, PHP 8.2–8.3, latest Cloudinary plugin, JetEngine 3.x.
- Screenshots from Crocoblock Support show that removing the SVG CSS resolves the issue.
Suggested Resolution
Improve Cloudinary’s admin URL parsing/handling logic to ignore data: URIs (SVGs or other inline assets).
Example: Skip replacement when the URL starts with data: instead of http/https.
This would prevent inline SVGs from breaking attachment URL replacement in the Admin area.
