Skip to content

Image is not found 404 inside md editor #7587

@yhranik-vp

Description

@yhranik-vp

Describe the bug
I have my documentation site published live at some URL, for example:
https://mydocs.com

Whenever I go to the Media tab and upload images, they are shown correctly. The image has a blob URL like this one:
blob:https://mydocs.com/712dfd3d-99c4-40ea-bff8-0e1403bd8b3c

With editorial workflow enabled, if I edit a draft page and add an image, it is not shown.

Inspecting the image request shows that it attempts to fetch it from the live site URL:

https://mydocs.com/img/uploads/some.png

This does not work because the image has not been published there yet.

Should the Markdown editor use blob URLs similar to the Media gallery tab?

DecapCMS 3.8.3 + Docusaurus + Github backend

config.yml (relevant part):

publish_mode: editorial_workflow

# These lines should *not* be indented
media_folder: "static/img/uploads" # Media files will be stored in the repo under static/images/uploads
public_folder: "/img/uploads" # The src attribute for uploaded media will begin with /images/uploads

collections:
  - name: docs
    label: Page
    folder: docs
    format: frontmatter      # required in Decap v3+
    extension: mdx           # use "md" if your docs are .md
    create: true
    slug: "{{slug}}"
    fields:
      - { name: title, label: Title, widget: string }
      - { name: sidebar_position, label: Sidebar Position, widget: number, required: false }
      - { name: body, label: Body, widget: markdown }
Image

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