-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Describe the bug
I want to insert existing images on my web site, i.e. the img src attribute for them will be /path/to/image.jpg
. But for a long time and continuing in Gutenberg 7.7.1 , the editor's (Add image) > Insert from URL won't accept/resolve a local path, it displays a tooltip "Please enter a URL."
To reproduce
Steps to reproduce the behavior:
- Create a new post
- Click on '+' then 'image'
- Click 'Insert from URL'
- Enter the full path to an existing static image on the same web site as your Wordpress and Gutenberg, and press or click the '↵' symbol.
- See error: you get the tooltip and the mini-dialog remains up.
Expected behavior
The mini-dialog to insert from URL should be able to resolve the site-relative path and find the image just as it can when I include my domain name. That just seems like a bug.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Fedora 31 Linux
- Browser: Firefox Nightly
- Version: 76.0a1
Additional context
The workaround is to insert the full URL (//mysite.com/path/to/image.jpg won't work either, I have to include the https: scheme), then switch the block to HTML mode and manually delete https://mysite.com
from the img src
attribute.
(I know about the WordPress Media Library.)