Skip to content

Dynamic Gallery: images added via the Media Library selector do not appear in the gallery  #81491

Description

@jordesign

Description

The Dynamic Gallery block shows images related to the current post, but the "related" scope only picks up images that were uploaded directly to that post — images added via the Media Library selector (i.e. re-using existing library items rather than a fresh upload) don't show up in the gallery.

Steps to reproduce

  1. Create or open a post.
  2. Add a Dynamic Gallery block.
  3. Add images to the post via the Media Library selector (choosing existing items rather than fresh uploads).
  4. Save and look at the Dynamic Gallery.

Expected

Images added via the Media Library also appear in the Dynamic Gallery — the gallery's inclusion rule accounts for both fresh uploads and existing library items used in the post.

Actual

Only directly-uploaded images appear in the Dynamic Gallery. Media-library-sourced images are ignored, even though they're visibly present in the post's content.

Reporter's own words

Images added via Media Library (rather than uploaded directly) don't show up in the Dynamic Gallery.

Environment

  • WordPress 7.1 RC1

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] GalleryAffects the Gallery Block - used to display groups of images[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    Status
    🦵 Punted to 7.2

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions