desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Image from HTML is not visible - in Firefox it is

Open HaraldNieswandt opened this issue 1 year ago • 10 comments

Preliminary Checks

  • [x] I have read and understood the important section above.
  • [x] I have searched existing issues and avoided creating duplicates.
  • [x] I am not filing an enhancement request.
  • [x] I have checked that this issue cannot be reproduced on Mozilla Firefox.
  • [x] I have checked that this issue can be reproduced once I removed all my Mods and Custom CSS.

What happened?

When opening an HTML file, the image is not displayed in Zen, but is visible in Firefox.

The HTML file was created as Markdown and exported with Pandoc.

The mardown:

---
title: "Beispiel eines Markdown mit Bild"
author: "Halade"
geometry: [left=2.5cm, right=2.5cm, top=3cm, bottom=3cm]
---


Das Bild wird im Zen nicht angezeigt, im Firefox wird es angezeigt.

![Brackets highlighting](HilightBrackets.png)

<figure>
  <img src="HilightBrackets.png" alt="Alternativer Text" style="max-width: 100%; margin: 0 auto;" />
  <figcaption>Brackets highlighted</figcaption>
</figure>

Und, funktioniert es?

ZenHtmlWithPic.zip

Expected behavior

Images should be displayed.

Actual behavior

Images are not displayed.

Steps to reproduce

Try my example.

The html:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <meta name="author" content="Halade" />
  <title>Beispiel eines Markdown mit Bild</title>
  <style>
    html {
      color: #1a1a1a;
      background-color: #fdfdfd;
    }
    body {
      margin: 0 auto;
      max-width: 36em;
      padding-left: 50px;
      padding-right: 50px;
      padding-top: 50px;
      padding-bottom: 50px;
      hyphens: auto;
      overflow-wrap: break-word;
      text-rendering: optimizeLegibility;
      font-kerning: normal;
    }
    @media (max-width: 600px) {
      body {
        font-size: 0.9em;
        padding: 12px;
      }
      h1 {
        font-size: 1.8em;
      }
    }
    @media print {
      html {
        background-color: white;
      }
      body {
        background-color: transparent;
        color: black;
        font-size: 12pt;
      }
      p, h2, h3 {
        orphans: 3;
        widows: 3;
      }
      h2, h3, h4 {
        page-break-after: avoid;
      }
    }
    p {
      margin: 1em 0;
    }
    a {
      color: #1a1a1a;
    }
    a:visited {
      color: #1a1a1a;
    }
    img {
      max-width: 100%;
    }
    h1, h2, h3, h4, h5, h6 {
      margin-top: 1.4em;
    }
    h5, h6 {
      font-size: 1em;
      font-style: italic;
    }
    h6 {
      font-weight: normal;
    }
    ol, ul {
      padding-left: 1.7em;
      margin-top: 1em;
    }
    li > ol, li > ul {
      margin-top: 0;
    }
    blockquote {
      margin: 1em 0 1em 1.7em;
      padding-left: 1em;
      border-left: 2px solid #e6e6e6;
      color: #606060;
    }
    code {
      font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
      font-size: 85%;
      margin: 0;
      hyphens: manual;
    }
    pre {
      margin: 1em 0;
      overflow: auto;
    }
    pre code {
      padding: 0;
      overflow: visible;
      overflow-wrap: normal;
    }
    .sourceCode {
     background-color: transparent;
     overflow: visible;
    }
    hr {
      background-color: #1a1a1a;
      border: none;
      height: 1px;
      margin: 1em 0;
    }
    table {
      margin: 1em 0;
      border-collapse: collapse;
      width: 100%;
      overflow-x: auto;
      display: block;
      font-variant-numeric: lining-nums tabular-nums;
    }
    table caption {
      margin-bottom: 0.75em;
    }
    tbody {
      margin-top: 0.5em;
      border-top: 1px solid #1a1a1a;
      border-bottom: 1px solid #1a1a1a;
    }
    th {
      border-top: 1px solid #1a1a1a;
      padding: 0.25em 0.5em 0.25em 0.5em;
    }
    td {
      padding: 0.125em 0.5em 0.25em 0.5em;
    }
    header {
      margin-bottom: 4em;
      text-align: center;
    }
    #TOC li {
      list-style: none;
    }
    #TOC ul {
      padding-left: 1.3em;
    }
    #TOC > ul {
      padding-left: 0;
    }
    #TOC a:not(:hover) {
      text-decoration: none;
    }
    code{white-space: pre-wrap;}
    span.smallcaps{font-variant: small-caps;}
    div.columns{display: flex; gap: min(4vw, 1.5em);}
    div.column{flex: auto; overflow-x: auto;}
    div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
    /* The extra [class] is a hack that increases specificity enough to
       override a similar rule in reveal.js */
    ul.task-list[class]{list-style: none;}
    ul.task-list li input[type="checkbox"] {
      font-size: inherit;
      width: 0.8em;
      margin: 0 0.8em 0.2em -1.6em;
      vertical-align: middle;
    }
    .display.math{display: block; text-align: center; margin: 0.5rem auto;}
  </style>
</head>
<body>
<header id="title-block-header">
<h1 class="title">Beispiel eines Markdown mit Bild</h1>
<p class="author">Halade</p>
</header>
<p>Das Bild wird im Zen nicht angezeigt, im Firefox wird es
angezeigt.</p>
<figure>
<img src="HilightBrackets.png" alt="Brackets highlighting" />
<figcaption aria-hidden="true">Brackets highlighting</figcaption>
</figure>
<figure>
<img src="HilightBrackets.png" alt="Alternativer Text" style="max-width: 100%; margin: 0 auto;" />
<figcaption>
Brackets highlighted
</figcaption>
</figure>
<p>Und, funktioniert es?</p>
</body>
</html>


Screenshots and videos

Image Image

Version

1.14.5b

What platform are you seeing the problem on?

Linux (Flatpak)

What component is this issue related to?

Other

Relevant log output if applicable


HaraldNieswandt avatar Jul 17 '25 10:07 HaraldNieswandt

Image

Ja, es funktioniert. No problem showing images here (Zen 1.15t - Win x64).

Since you are on Linux, does it help when you change the image src="HilightBrackets.png" to src="./HilightBrackets.png" ?

Propheticus avatar Jul 20 '25 15:07 Propheticus

Image

Can't reproduce on Linux using the non-Flatpak version of Zen Browser.

@HaraldNieswandt is your Firefox also the Flatpak version?

Hajime-Hajime avatar Jul 20 '25 15:07 Hajime-Hajime

Moin,

my Zen Browser is from Flathub (is not in Systempackage) and Firefox is from Systempackage.

(The reason is: I use in 99.999% Zen)

HaraldNieswandt avatar Jul 21 '25 07:07 HaraldNieswandt

...

Ja, es funktioniert. No problem showing images here (Zen 1.15t - Win x64).

Since you are on Linux, does it help when you change the image src="HilightBrackets.png" to src="./HilightBrackets.png" ?

Hello and thank you very much for your answer,

I tried it:

---
title: "Beispiel eines Markdown mit Bild"
author: "Halade"
geometry: [left=2.5cm, right=2.5cm, top=3cm, bottom=3cm]
---


Das Bild wird im Zen nicht angezeigt, im Firefox wird es angezeigt.

![Brackets highlighting](./HilightBrackets.png)

<figure>
  <img src="./HilightBrackets.png" alt="Alternativer Text" style="max-width: 100%; margin: 0 auto;" />
  <figcaption>Brackets highlighted</figcaption>
</figure>

Und, funktioniert es?

The result is the same - no image in the browser:

Image

In Firefox is it ok ...

Image

HaraldNieswandt avatar Jul 25 '25 07:07 HaraldNieswandt

Maybe you have an old cached version of the 'site' / file? > try Ctrl + F5 / Ctrl+Shift+R

Propheticus avatar Jul 25 '25 09:07 Propheticus

Maybe you have an old cached version of the 'site' / file? > try Ctrl + F5 / Ctrl+Shift+R

That's not the case.

But, to make it sure, I wrote a new example. In a new folder. Result is the same.

Interesting is: Zen cannot find the image. A double click in the html data in Zen opens not the image. In Firefox works this way.

Is it possible to have some restrictions from Linux against a Flathub application?

HaraldNieswandt avatar Jul 25 '25 11:07 HaraldNieswandt

It is possible to opens the image via "Ctr + o" - in Zen and in Firefox.

The very strange thing is: The path of the image is shown in Zen as "file:///run/user/1000/doc/71da0c30/HilightBrackets.png", in Firefox as "file:///home/harald/Dokumente/ZenHtmlImages/HilightBrackets.png".

Image

Screenshot from Zen

Image

Screenshot from Firefox

HaraldNieswandt avatar Jul 25 '25 12:07 HaraldNieswandt

Is it possible to have some restrictions from Linux against a Flathub application?

Yes, there could be file system access restrictions if you have not configured Zen's flatpak permissions. (since a flatpak app operates as a sandbox, with restricted access to the host sytem)

https://docs.flatpak.org/en/latest/sandbox-permissions.html https://linuxconfig.org/understanding-flatpak-security-and-permissions https://askubuntu.com/questions/1086529/how-to-give-a-flatpak-app-access-to-a-directory

Propheticus avatar Jul 25 '25 14:07 Propheticus

Thank you all for your support. I changed the access permissions for Zen.

Unfortunately, this resulted in Zen greeting me with a "Welcome" message. All settings were deleted and irretrievable. It's as if I had reinstalled Zen.

That's annoying, but there's nothing I can do about it.

The images from the HTML file are still not displayed.

So I'll be using Firefox again ...

HaraldNieswandt avatar Jul 26 '25 09:07 HaraldNieswandt

Hi, @HaraldNieswandt. I'm Dosu, and I'm helping the desktop team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that images in HTML files exported from Markdown with Pandoc do not display in the Zen Browser (Flatpak on Linux), while they appear fine in Firefox.
  • Attempts to fix by adjusting image paths and clearing cache did not resolve the issue.
  • Comments suggest Flatpak sandbox restrictions might be causing the problem by limiting file system access.
  • Even after changing Flatpak permissions (which reset Zen's settings), images still do not show.
  • You mentioned continuing to use Firefox due to this unresolved issue.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of the Zen Browser desktop app by commenting here.
  • If I do not hear back within 10 days, this issue will be automatically closed.

Thanks for your understanding and contribution!

dosubot[bot] avatar Oct 25 '25 16:10 dosubot[bot]