Skip to content

bug(media): Caption field value is missing from response data payload #3018

Description

@palockocz

Description

When adding or editing an image in the media modal, the Alt Text field saves and reflects correctly in the API response/data payload. However, the Caption field value is omitted/missing from the returned image object entirely.

Previously, removing and re-adding the image would occasionally workaround the issue, but as of current versions, the caption fails to persist/appear completely.


Priority & Impact / Request for Hotfix

Note: Please consider releasing a hotfix for this issue once resolved rather than waiting for the next major/minor release. Without the caption field, it is currently impossible to include image descriptions and source/credit information, which directly impacts production usability.


Expected Behavior

The returned JSON payload should include a caption property containing the value entered in the media details form (e.g., caption: 'Test xxx').


Actual Behavior

The alt property is correctly present in the object, but the caption field/property is entirely missing from the response payload:

{
  id: '01M236SY1S4NQ2DFDA4236Q9QG',
  provider: 'local',
  filename: 'mor-shani-li4dxZ0KYRw-unsplash.jpg',
  mimeType: 'image/jpeg',
  width: 2400,
  height: 1676,
  blurhash: 'LmG[{5M|s.oz.ARkWBj]4?oeNGae',
  dominantColor: 'rgb(126,126,124)',
  alt: 'Alt text xxxx',
  meta: {
    storageKey: '01M236SY1S8EDSXKKRKVBKFW1S.01M236SY25VRT0ZF1X0A9PGB8J.jpg'
  }
}

Steps to reproduce

  1. Open the Media Details modal for an uploaded image.
  2. Fill in values for both Alt Text (e.g., "Alt text xxxx") and Caption (e.g., "Test xxx").
  3. Click Save.
  4. Inspect the resulting image JSON / data payload.

Environment

  • emdash version: 0.36/0.37
  • Node.js version: 22
  • Runtime: Node
  • OS: macOS/Linux

Screenshots

Image Image

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions