allure-framework / allure-framework/allure3

markdown attachments: request for a native way to resolve relative local images

Open
#837 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
401
Forks
58
Avg merge
2d 20h
Merged PRs (30d)
34

Description

### What problem should this solve?

Hey team,
With the native markdown rendering added in Allure 3 (#655), handling manual tests inside the framework is awesome. But there's a big friction point when dealing with local screenshots referenced inside those .md files.
If I use a standard relative path in my workspace:

Image

The image breaks in the Allure viewer with a 404 because the browser tries to resolve the path relative to Allure's compiled report routing instead of the asset folder location.

### What would you like to happen?

## What Works vs What Breaks

* Remote URLs work perfectly: it loads fine because the browser can just fetch it directly over HTTP.
* Local relative paths break: Anything like ../assets/dashboard.png drops a broken image icon because the assets aren't packed or mapped into the generated report context.

## My Current Workaround (Which feels like overkill)
To get this working right now, I'm having to hack together an automated pipeline script that:

1. Regex parses all my clean VS Code markdown files.
2. Rewrites the clean relative paths into absolute local webserver links like http://localhost:8000/tests/manual/assets/dashboard.png.
3. Spins up a background python -m http.server 8000 instance during the test run just so the Allure UI can fetch the files.

Why I'm not using Base64:
People keep recommending the Base64 embedding approach, but it sucks for observability. Putting massive binary strings inside the markdown files completely ruins reading them in IDEs like VS Code, and it absolutely trashes Git diff history.
## Feature Request / Looking for a Cleaner Way
Is there any cleaner architectural way around this, or can we get a feature to handle this natively?
A couple of ideas:

1. Could Allure automatically parse the text/markdown file during generation, find the referenced local images, and bundle them into the report's attachments/ folder?
2. Or, could we get something like a markdownAssetRoot configuration option inside allurerc.mjs? That way, the Allure compiler knows exactly how to map relative paths to a static workspace directory without breaking local IDE setups.

Keen to hear your thoughts on this or if anyone has a better pattern that doesn't involve spinning up side-car web servers. Thanks!

### Alternatives considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading the native markdown rendering work from #655 and the allurerc.mjs configuration mentioned in the request. Reproduce a markdown file with a relative image and inspect the generated report's attachments/ folder and routing behavior. Done means a supported configuration or bundling path lets relative local images load in the Allure viewer without rewriting the markdown or running a side-car server.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.