Images not showing in readme file of the keyboard installation process

The images included in the welcome.htm file display correctly, while those in the readme.htm don’t. The same happens with the stylesheet, whose styles are correctly used in the welcome.htm file, while those in the readme.htm file are not. The code is the same for both files, except for the file location, as the welcome.htm file is situated within the welcome folder. Here below the salient lines of the two files:


File: welcome.htm


<head>
    <link rel="stylesheet" type="text/css" href="styles.css">
</head>

<body>
    <img src="flag.png">
</body>

File: readme.htm


<head>
    <link rel="stylesheet" type="text/css" href="welcome/styles.css">
</head>

<body>
    <img src="welcome/flag.png">
</body>

Thanks

The reason this is happening is that the compiled package flattens the folder structure – so there are no subfolders. Removing the welcome/ prefix from the URLs will resolve the issue. (You could move readme.htm into the welcome folder so that the paths also resolve on the source side.)

1 Like

Tried both solutions, not working :frowning:

Hello @anvaolon,

We are unable to reproduce the behaviour you describe. It would be helpful if you could provide us with the folder layout and images of the behaviour.

In the meantime, we put the information (and the code) above into good use and here is what we got:

  1. We added a style file and an image inside the welcome folder

    welcome.htm
  2. Referring to the welcome folder in readme.htm

    readme.htm
  3. The images appears and the style applies

We look forward to your progress. Thank you!

Thank you for your reply @mengheng. I think I didn’t explain the issue well. The last image you posted shows the “readme.htm” file open in the browser, but that works for me too, but it is not shown correctly (no images and no styles) in the “Read me” tab of the installation package.

Thanks

1 Like

This may be a feature (or bug) in the readme.htm file display. I don’t believe images display in the readme.htm files in preview mode like the following, where I’ve added an .ico file. It displays fine when I open in a browser, but not in the install package (see red square in below graphic). We have generally not encouraged the use of graphics in readme.htm files so I haven’t complained about this.
test-readme

If you’d like to open an issue in github, you are very welcome to do so! Start here and click on “New Issue”. Issues · keymanapp/keyman · GitHub

1 Like

Thank you for clarify the issue for us, @anvaolon.

The issue had been reported, let’s track the progress here - (bug: Images included in the "readme.htm" file are not displayed in the "Read me" tab during the installation process. · Issue #10308 · keymanapp/keyman · GitHub).

Thank you @Marc and @Lorna for the insightful instructions throughout the discussion.

This topic was automatically closed after 13 days. New replies are no longer allowed.