pattern-directory
pattern-directory copied to clipboard
Patterns: Remove `id`s from the copied pattern code
See https://github.com/WordPress/gutenberg/issues/60323 — Patterns created outside of the pattern creator have "local" images, with id
values matching that other site. When they're used in the pattern directory and then copied, the ID attribute tells the editor that it's not an external image, so you don't get the "upload image" button, even though it's not an image on the destination site.
Can the id
attribute be filtered out on copy so that this doesn't happen?
Related: https://github.com/WordPress/pattern-directory/issues/494