Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Image links are broken because of appended .md #39

Closed
3 tasks done
sean808080 opened this issue Nov 11, 2022 · 7 comments
Closed
3 tasks done

[Bug]: Image links are broken because of appended .md #39

sean808080 opened this issue Nov 11, 2022 · 7 comments
Assignees

Comments

@sean808080
Copy link

sean808080 commented Nov 11, 2022

Issue validation

Workflow

Obsidian plugin 💠

Describe the bug

Images are broken when published because the image URL has .md appended to the end.

Example:
After publishing to GitHub from Obsidian, a note has the following reference too an image file:
![Paper.Journal.1.jpeg](../images/obsidian/Paper.Journal.1.jpeg.md)

This results in a broken image icon instead of the actual image.
Changing it to:
![Paper.Journal.1.jpeg](../images/obsidian/Paper.Journal.1.jpeg)

fixes the issue and the image shows as expected.

How to reproduce ?

No response

Configuration

{
"githubRepo": "blog",
"githubName": "me",
"GhToken": "token",
"githubBranch": "main",
"shareKey": "share",
"shareKey": "share",
"ExcludedFolder": "",
"fileMenu": true,
"editorMenu": true,
"downloadedFolder": "fixed",
"folderDefaultName": "obsidian",
"yamlFolderKey": "category",
"rootFolder": "docs",
"workflowName": "",
"embedImage": true,
"defaultImageFolder": "images/obsidian",
"autoCleanUp": true,
"autoCleanUpExcluded": "docs/assets/js, docs/assets/meta, docs/assets/css, tags.md",
"folderNote": true,
"convertWikiLinks": true,
"convertForGithub": true,
"subFolder": "",
"embedNotes": false,
"copyLink": false,
"mainLink": "",
"linkRemover": "",
"hardBreak": false,
"logNotice": true,
"convertDataview": false,
"useFrontmatterTitle": false,
"censorText": [
{
"entry": "(?<!\\)\\\\[(.*?)\\\\]\\\\((?!(http|\\\\/*image|obsidian\\\\/image))(\\\\.\\\\/)*(.+?)(\\\\.md)*\\\\) ", "replace": "[$1]({% link obsidian/$4.md %})", "after": false }, { "entry": "(?<!\\\\)\\[(.*?)\\]\\(((obsidian\\/)?image)(.+)\\)",
"replace": "$1",
"after": false
}
],
"inlineTags": false,
"dataviewFields": [],
"excludeDataviewValue": [],
"metadataFileFields": [],
"frontmatterTitleKey": "title",
"shareExternalModified": false
}

Relevant log output

No response

OS

No response

Anything else?

No response

@sean808080 sean808080 added the bug label Nov 11, 2022
@Mara-Li
Copy link
Member

Mara-Li commented Nov 11, 2022

Image with . are not accepted in any OS (at last windows ?).

Also, could you please share the file contents ? Maybe I forgot to set the jpeg...

@sean808080
Copy link
Author

I'm on a Mac. I updated the image file name to remove extra periods and see the same issue.

![PaperJournal1.jpeg](../images/obsidian/PaperJournal1.jpeg.md)

A link to the actual .jpg is here

The same problem is observed with .jpg files as well.

@Mara-Li
Copy link
Member

Mara-Li commented Nov 11, 2022

Strange. Do you have a obsidian md file example ? I didn't have this on my side, so I don't understand :w
Did you try to run without the regex replacing ?

@Mara-Li
Copy link
Member

Mara-Li commented Nov 11, 2022

EDIT: I successfull repro the problem without regex.
Why ? Dunno. Will investigate. Thanks!

@sean808080
Copy link
Author

Can we keep the issue open so I can be notified when it's fixed to retest. Thanks!

@Mara-Li
Copy link
Member

Mara-Li commented Nov 12, 2022

It's literally fixed in the last release

@sean808080
Copy link
Author

oops..didn't realize it. I just tested it and it's working. Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants