-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative scheme images no longer display in the editor #54262
Comments
Same here, basically makes using relative path in WP_CONTENT_URL impossible. |
Also have this issue if you define a gutenberg template for a post type that uses an image:
I suspect this has something to do with the editor being rendered in an iframe where the src starts with "blob". Likely a security issue, but would love to be able to use relative image urls in a block template... |
My use case is to use relative URLs in
|
I'm using image URLs like this "/_images/wp-uploads/2024/06/.....webp". Any workaround possible? |
Here is an ugly workaround that works for my use case: FUNCTIONS.PHP:
CUSTOM-EDITOR.JS:
|
I created a pull request in #66751 that fixes this issue. |
From the PR discussion, I'm gathering this will be addressed in WordPress release version 6.8? I cannot find any reference to PRs 66751 nor 68024 in https://core.trac.wordpress.org/report/6 I'm impacted by this bug and would like to assess whether it's worth waiting for the proper fix or if I should implemented the aforementioned workaround. |
It's now included in the Gutenberg Plugin and will be released in WordPress 6.8 (April 15, 2025) |
Description
In WordPress 6.3 and the current version of the Gutenberg plugin, 16.6.0, images with relative schemes are not displayed correctly in the block editor. On the front end they render as expected.
In the editor, the images are shown as a broken image and -- browser dependent -- the alt text shown in it's place.
Step-by-step reproduction instructions
define( 'WP_CONTENT_URL', '//example.local/wp-content' );
Screenshots, screen recording, code snippet
WordPress 6.3 (with and without the latest version of Gutenberg active)
WordPress 6.2 (without Gutenberg active)
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: