Skip to content

once again you can't insert a site-local image URL #70041

Closed
@skierpage

Description

@skierpage

Description

I want to insert existing images on my web site, i.e. the img src attribute for them will be /path/to/image.jpg. This worked fine, then you broke it around Gutenberg 7.7 and I reported issue #20903 , then it worked again (@Mamaduka closed it as completed in 2021), now it's broken again.

Additional context
The workaround is to insert the full URL including the https: scheme. Then click Replace and in the "Current media URL:" field delete the https://mydomain part. Or, use a browser inspector to modify the HTML of the Gutenberg browser tab and remove type="url" from the ` tag for the "Paste or type URL" text field.

As before, the problem is Gutenberg sets the type of the "Paste or type URL" text field to url which requires the scheme.

(I know about the WordPress Media Library.)

Step-by-step reproduction instructions

As before

  1. Create a new post
  2. Click on '+' then 'image'
  3. Click 'Insert from URL'
  4. Enter the local path to an existing static image on the same web site as your Wordpress and Gutenberg (such as /path/to/image.jpg), and press Enter or click the '↵' symbol.
  5. See screenshot: you get the tooltip "Please enter a URL" and the mini-dialog remains up.

Screenshots, screen recording, code snippet

Image

Environment info

  • Gutenberg 20.7.0
  • twentyten responsive
  • happens with Firefox and chromium-browser

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Labels

[Feature] MediaAnything that impacts the experience of managing media[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions