Convert Mermaid diagram code to images (PNG, JPG, PDF, SVG)
Author: hjlarry
Version: 0.0.1
Type: tool
Repo: https://github.com/hjlarry/dify-plugin-mermaid
A Dify plugin that converts Mermaid diagram code to images in multiple formats (PNG, JPG, PDF, SVG) using the mermaid.ink API service. This plugin enables users to generate visual diagrams programmatically within Dify workflows and agent interactions.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | The Mermaid diagram syntax code | |
| select | No | png | Output format: png, jpg, svg, pdf | |
| select | No | default | Visual theme: default, dark, neutral, forest | |
| string | No | transparent | Background color (hex code or named color) | |
| number | No | - | Image width in pixels | |
| number | No | - | Image height in pixels |
The converter config:

Here I create a workflow and ask the LLM to generate a git common operation mindmap by mermaid code:

The final result:

"Invalid Mermaid syntax"
"Conversion timeout"
"Diagram too large"
Empty or corrupted output