Images not displayed in Preview after 3.8.4 upgrade
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**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**
```yml
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**
Contributor guide
Assessment
This issue has not been assessed yet.