WordPress/gutenberg

Pasting direct image URL inserts Embed block instead of Image block

Open

#74,734 创建于 2026年1月19日

在 GitHub 查看
 (6 评论) (1 反应) (1 负责人)JavaScript (9,607 star) (3,893 fork)batch import
Good First Issue[Block] Embed[Feature] Paste[Status] In Progress[Type] Bug

描述

Description

When pasting a direct image URL into the WordPress/Gutenberg editor, the editor should insert the image (e.g., by creating an Image block). Instead, it attempts to treat the URL as embeddable content and inserts an Embed block.

Expected: Pasting a direct image URL (e.g., .jpg, .png, .gif, .webp) into the editor inserts the image (Image block) and displays it inline.

Actual: Pasting a direct image URL into the editor creates an Embed block / embed preview rather than inserting the image.

Step-by-step reproduction instructions

  1. Go to editor
  2. Try pasting a URL for an image (ex. https://www.birds.cornell.edu/home/wp-content/uploads/2023/09/334289821-Baltimore_Oriole-Matthew_Plante.jpg)
  3. Embed block is shown

Screenshots, screen recording, code snippet

Environment info

  • WordPress 6.9, Default Gutenberg, Twenty Twenty Five
  • Chrome Version 143.0.7499.42 (Official Build) (arm64)
  • Mac OS Sequoia 15.7.3

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

贡献者指南

Pasting direct image URL inserts Embed block instead of Image block · WordPress/gutenberg#74734 | Good First Issue