Iframe no longer loading local html files

Iframe used to be able to display locally hosted html files (e.g. plotly graphs) but with a recent update all these frames are now blank.

For example this previously worked to display an interactive plotly graph (c.7mb) saved in html.
title=“Inline Frame Example”


Now it appears as a blank 700x550 area.

Please follow and include the bug report template when submitting bug reports. Thanks.

Do you remember the version of Obsidian you were using before you updated?

It could be this:

  • Removed support for app://local URLs. These were reported as a potential vulnerability when using iframes.


Hello, I am encountering a similar situation. Here is my setup so far:

On Obsidian 1.5.8, I have a plugin that alters the iframe src so that it’s convenient to modify the (relative) path and so that it works on my phone as well:

import { MarkdownPostProcessorContext, Plugin, TFile } from "obsidian";

console.log("Running obsidian-local-html-plugin");

export default class LocalHTMLSrcPlugin extends Plugin {
	async onload() {
			(el: HTMLElement, ctx: MarkdownPostProcessorContext) => {
				// get active file
				const activeFile: TFile | null =
				if (activeFile === null) {

				// get active file directory
				const activeFilePath: string =
				const activeFileDir: string = activeFilePath.substring(

				// remove system-specific prefix for assets
				const prefixes = [

				// search active file for any iframes
				const iframes: HTMLIFrameElement[] = Array.from(
				).filter((el: HTMLIFrameElement) =>
						.map((prefix: string) => el.src.startsWith(prefix))
						.some((el: boolean) => el)
				for (const iframe of iframes) {
					let iframeSrcIsRelative = false;

					let relPath: string = iframe.src;
					for (const prefix of prefixes) {
						if (relPath.startsWith(prefix)) {
							relPath = relPath.replace(prefix, "");
							iframeSrcIsRelative = true;

					if (iframeSrcIsRelative) {
						iframe.src = `${activeFileDir}/${relPath}`;
						// console.log(iframe.src);
						// app://some-sort-of-id/C:/path/to/test.html

that’s transpiled to js and copied to the plugins folder locally.

I also have a test.md file with the following:

<iframe src="./test.html" height=500 width=500></iframe>

as well as a test.html file:

<!DOCTYPE html>
<html lang="en">
		<meta charset="utf-8" />

in the same folder as test.md.

When the plugin runs, the iframe’s src is like app://some-sort-of-id/C:/path/to/test.html; this had worked in the past (I do not know the Obsidian version specifically, but it must have been more than a year ago). When I went back to open the markdown file with the iframe, it no longer shows the iframe, and instead showed a blank space. I’m not sure what could have changed since then; localhost isn’t being used (at least, I don’t think so…).