Skip to content

Media Library: Create a media editor, that can be used from within the post and site editors #72734

@andrewserong

Description

@andrewserong

Similar to how template parts can be edited from within the post and site editors, add a state of the editor that allows for editing media items, both cropping and metadata (i.e. updating caption, description, alt-text).

Earlier design:

Image

Current status:

Image

Available as an experiment in Gutenberg:

Image

It can then be navigated to via the Image block where an "Edit media" button is injected into the block toolbar. Features as of now:

To-do

  • Add cropping tools
  • Update actions for media items. Currently the action to trash a media item doesn't work. For now, let's swap this for permanently delete. Also, double-check other actions and remove any that don't currently work.
  • The transition between editors in the post editor can reveal a bit of the wp-admin popping into view briefly. It also happens in trunk when clicking 'Edit' on synced patterns, but would be good to polish.
  • Can we update the URL so that if a user reloads the editor while editing an image, they're returned to the image? Related issue: Template Part: Reloading the template part editor within the post editor throws an error — this may depend on creating a dedicated route for media
  • Flesh out the media route in the site editor, currently the sidebar looks very empty (as mentioned in this comment)

Metadata

Metadata

Assignees

Labels

[Feature] MediaAnything that impacts the experience of managing media[Type] EnhancementA suggestion for improvement.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions