Skip to content

Media used only by a companion post is not carried with a library item #535

Open

Description

@rahulwalunje

Problem

When a page is saved to a cloud library, its design system now travels inside the page's library item (#518, #519). Images that only the design system references do not. They are not added to the item's attachments on save, and on import their URLs are not rewritten, so they keep pointing at the source site.

Where

  • LibraryItemPostController::get_save_data() builds media.attachments from the primary post only (get_post_image_paths( $post )).
  • The media import and URL rewrite (import_post_media_from_library, replace_imported_attachment_urls_in_meta) run against the primary post id only.

Expected

Images a companion references are uploaded with the item and rewritten to local URLs on the companion after import.

Notes

Only matters for design systems that reference media. Known gap when #519 was written; left out of scope there.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions