Skip to content

Images not displayed in Preview after 3.8.4 upgrade #7639

@pranaysahith

Description

@pranaysahith

Describe the bug

Starting Decap CMS version 3.8.4, the images are not showing up in the Preview pane. Reverting to 3.8.0 resolves the issue.

To Reproduce

  1. Go to Decap CMS admin page.
  2. Open any document with embedded images.
  3. Images now showing up in the preview pane.
  4. Instead of loading the image.png using https://docs.example.com/.attachments/image.png it is using a url
    https://docs.example.com/docs/blob:https:/docs.example.dev/8e940e36-ba6c-49aa-9d0b-c50104e92019 which throws 404 not found error.
  5. I also see an API call made to the git repo provider with a wrong file name if the file name contains open brackets. For example, if the image path is /.attachments/image(35).png it tries to load /.attachments/image(35 from the git repo which throws 404 not found.

Expected behavior

Image load correctly in the Preview pane.

Screenshots

Applicable Versions:

  • Decap CMS version: 3.8.4
  • Git provider: Azure
  • OS: Ubuntu 24
  • Browser version: Chrome Version 141.0.7390.108 (Official Build) (arm64)
  • Node.JS version:

CMS configuration

show_preview_links: false
media_folder: "docs-site/static/.attachments/"
public_folder: "/.attachments"
collections:
  - name: "docs"
    label: "docs"
    folder: docs-site
    create: true
    extension: 'md'
    summary: "{{dirname}}/{{filename}}.{{extension}}"
    fields:
      - { label: "Title", name: "title", widget: "string", required: false }
      - { label: "Body", name: "body", widget: "markdown", required: false }
      - { label: "Sidebar position", name: "sidebar_position", widget: number, value_type: int }
      - { label: "Tags", name: "tags", widget: "list", required: false }
    nested:
      depth: 10
      subfolders: false
      summary: '{{slug}}'
    sortable_fields: ['commit_date', 'title', 'commit_author', 'sidebar_position']

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions