# Load Mermaid source locally instead of remotely

**URL:** https://meta.discourse.org/t/load-mermaid-source-locally-instead-of-remotely/282422
**Category:** Feature
**Tags:** completed, mermaid
**Created:** [July 24, 2022, 9:22am UTC](https://meta.discourse.org/t/load-mermaid-source-locally-instead-of-remotely/282422 "2022-07-24T09:22:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Natureshadow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natureshadow/32/196090_2.png) [@Natureshadow](https://meta.discourse.org/u/Natureshadow)
#### Post date: [July 24, 2022, 9:22am UTC](https://meta.discourse.org/t/load-mermaid-source-locally-instead-of-remotely/282422/1 "2022-07-24T09:22:20Z")

</div>

Thanks for this component!

It seems the source of mermaid is hard-coded, so installing this plugin makes Discourse transmit user data to [unpkg.com](http://unpkg.com), voiding GDPR compliance and general sane best practices.

Please add an option to load mermaid from a custom source.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 25, 2022, 12:00am UTC](https://meta.discourse.org/t/load-mermaid-source-locally-instead-of-remotely/282422/2 "2022-07-25T00:00:56Z")

</div>

We have patterns for both

1. Dynamic height calculation
2. Local assets

In [GitHub - SamSaffron/discourse-svgbob: svgbob component for Discourse · GitHub](https://github.com/discourse/discourse-svgbob) , recommend porting both over.

#pr-welcome for that.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [November 22, 2022, 7:11am UTC](https://meta.discourse.org/t/load-mermaid-source-locally-instead-of-remotely/282422/3 "2022-11-22T07:11:06Z")

</div>

FYI I have a PR that updates mermaid, uses local assets and does auto sizing.

[https://github.com/discourse/discourse-mermaid-theme-component/pull/12](https://github.com/discourse/discourse-mermaid-theme-component/pull/12)

Should be merged soon.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [October 16, 2023, 5:05pm UTC](https://meta.discourse.org/t/load-mermaid-source-locally-instead-of-remotely/282422/4 "2023-10-16T17:05:39Z")

</div>


