Open mtias opened 10 months ago
Just jotting down a quick thought/idea for how part of this might work (implementation-wise) for replacing multiple images at once:
Could the behaviour with the media library / media selection work in a way where it doesn't need to be aware of patterns per se, but given a list of selected blocks, it figures out which ones are image blocks, counts how many, and in the media library, allows you to replace up to that many of the image blocks with another selection of media items?
That way the same "replace" behaviour could work if a pattern is selected, or if a user does a selection of, say, 3 images in a Gallery block, or part of a post or page that contains several image blocks.
Could the behaviour with the media library / media selection work in a way where it doesn't need to be aware of patterns per se, but given a list of selected blocks, it figures out which ones are image blocks, counts how many, and in the media library, allows you to replace up to that many of the image blocks with another selection of media items?
This sounds like a good abstraction. It could then work with any pattern, or even site. For the latter, I'm guessing it could make a site-building AI assistant's role easier by allowing it to respond to requests such as "replace all the images with ones that have flowers in them".
It should be easy to replace all images in a pattern or set of patterns with images from the media library or a new set of uploads. Some of the following scenarios seem worth exploring:
wp_block
) offer an option in the toolbar for media assignment; it'd open the media library contextually, and allow you to select as many images as image or media blocks are in the current pattern.