KosmosisDire / obsidian-webpage-export

Export html from single files, canvas pages, or whole vaults. Direct access to the exported HTML files allows you to publish your digital garden anywhere. Focuses on flexibility, features, and style parity.
https://docs.obsidianweb.net/
MIT License
890 stars 77 forks source link

[Bug] [1.8.01]: Export of images does not work in all modes #537

Open 42Craft opened 1 month ago

42Craft commented 1 month ago

What happened?

In my vault, the attachments folder contains all attachments, such as images. These images are not properly exported in all modes. When I try to open them, Windows states that the file format is not supported. On the web server, it only shows a broken image icon.

I did notice that my original image file names contain spaces: Abiskojaure - Abisko_20240921221535779.jpg After the export, it is changed into: abiskojaure-abisko_20240921221535779.jpg

Reproduction

Rename an image jpg file to Abiskojaure - Abisko_20240921221535779.jpg. Export using any mode. I use Online Web Server mode.

After exporting, the jpg file is renamed to abiskojaure-abisko_20240921221535779.jpg and appears to be corrupt.

Last Working Version

No response

Version

1.8.01

Operating System

Windows

Obsidian Version

1.7.4

Which browsers can you reproduce this in?

No response

Relevant log output

Log:
[WARNING]   No existing export metadata found. All files will be exported.
[WARNING]   No existing search index found. All files will be exported.
[WARNING]   No existing RSS feed found. All files will be exported.
[INFO]  Using "abisko" header because it was very similar to the file's title.
[INFO]  Using "kiruna" header because it was very similar to the file's title.
[INFO]  Using "open questions" header as title because it was H1 at the top of the page
[INFO]  Using "general travel" header as title because it was H1 at the top of the page
[INFO]  Closing render window

Settings:
    settingsVersion --------- 1.8.01
    makeOfflineCompatible     false
    inlineAssets ------------ false
    includePluginCSS          1 plugins included
    includeSvelteCSS -------- true
    titleProperty             title
    customHeadContentPath ---
    faviconPath              
    documentWidth ----------- 40em
    sidebarWidth              20em
    minOutlineCollapse ------ 2
    startOutlineCollapsed     false
    allowFoldingHeadings ---- true
    allowFoldingLists         true
    allowResizingSidebars --- true
    logLevel                  warning
    minifyHTML -------------- true
    makeNamesWebStyle         true
    onlyExportModified ------ true
    deleteOldFiles            true
    addThemeToggle ---------- true
    addOutline                true
    addFileNav -------------- true
    addSearchBar              true
    addGraphView ------------ true
    addTitle                  true
    addRSSFeed -------------- true
    siteURL                   http://<REDACTED>
    authorName -------------- <REDACTED>
    vaultTitle                Notes
    exportPreset ------------ website
    openAfterExport           false
    graphAttractionForce ---- 1
    graphLinkLength           10
    graphRepulsionForce ----- 150
    graphCentralForce         3
    graphEdgePruning -------- 100
    graphMinNodeSize          3
    graphMaxNodeSize -------- 7
    showDefaultTreeIcons      false
    emojiStyle -------------- Native
    defaultFileIcon           lucide//file
    defaultFolderIcon ------- lucide//folder
    defaultMediaIcon          lucide//file-image
    exportPath -------------- W:\\\\<REDACTED>
    filesToExport             1

Enabled Plugins:
    Map View
    Dataview
    Auto Link Title
    Local Images Plus
    Quick Explorer
    Attachment Management
    File Diff
    Better Export PDF
    Webpage HTML Export

Additional Info

No response

KosmosisDire commented 1 week ago

Hey, can you try this in the beta version and see if it works better for you? There are instructions in the readme

42Craft commented 6 days ago

Hey, can you try this in the beta version and see if it works better for you? There are instructions in the readme

Fixed in the beta version. Thank you so much! Do you have an estimation when this will be merged to the release version?

KosmosisDire commented 6 days ago

I can't give a good estimate as I work on this in my free time (which I don't have much of) but it will likely be releasesd as stable pretty soon. Hopefully before next year