Automattic / newspack-plugin

An advanced open-source publishing and revenue-generating platform for news organizations.
https://newspack.com
GNU General Public License v2.0
323 stars 48 forks source link

Image Credits: no preview in the editor #1627

Open adekbadek opened 2 years ago

adekbadek commented 2 years ago

Describe the bug When using an image with credits (#1147), the credits do not appear in the editor.

To Reproduce Steps to reproduce the behavior:

  1. Add credit to an image
  2. Insert it in a post or page
  3. Observe the credit does not appear in the editor

Expected behavior The image credit should appear in the editor, just like it does on the front-end.

laurelfulford commented 2 years ago

@adekbadek Discussed this issue a bit -- one odd thing to consider:

When you add an image block to the editor, if it has a caption in the Media Library, it will be displayed automatically. If you edit that caption from the image block, it will display your new caption in the story, but it will not update the original caption set in the Media Library. This is helpful because you can use the same image multiple times, but craft the caption based on context (or choose not to show a caption at all in some cases).

The credit is a little different. There's not really a reason why a photo's credit should change based on context -- if shown, it should always attribute the same person. But having it behave differently could be confusing. So to add it to the editor, we'll need to consider whether it should be editable from there too: