Skip to content

[Astro] inline styles set to [object Object] in markdown for local images #845

@mrkirby153

Description

@mrkirby153

Describe the bug
When using the imageService with astro markdown files, the resulting <img> tag generated has its inline styles set to [object Object].

To Reproduce
Steps to reproduce the behavior:

  1. Add an image to a markdown file (e.g. ![My Image](./image.jpg)
  2. Render the markdown (e.g. via a content collection)
  3. Run astro dev or astro build
  4. Look at the generated HTML in the dev console

https://stackblitz.com/edit/github-ay3eaawt -- Looking at any of the images on this (/blog/markdown-style-guide/) should demonstrate the issue

Expected behavior
The inline styles should be rendered correctly.

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions