Skip to content

images with relative paths can be displayed properly.#1562

Closed
Tang895 wants to merge 2 commits into
jocmp:mainfrom
Tang895:patch-1
Closed

images with relative paths can be displayed properly.#1562
Tang895 wants to merge 2 commits into
jocmp:mainfrom
Tang895:patch-1

Conversation

@Tang895

@Tang895 Tang895 commented Nov 6, 2025

Copy link
Copy Markdown

Pass in the base URL so that images with relative paths can be displayed properly.
comment two "HtmlPostProcessor.clean(contentHTML, hideImages = hideImages)"

Commented out HtmlPostProcessor.clean calls to prevent incorrect cleaning of documents with relative image paths.
Pass in the base URL to load images with relative paths.
@jocmp

jocmp commented Nov 6, 2025

Copy link
Copy Markdown
Owner

Hey @Tang895, thanks for taking the time to look into this. From what I remember, the base URL will sometimes prevent images from loading if it's present due to some cross-site rules.

I had addressed this previously with the following PR with an allowed list of sites. I don't remember why I ripped it out:

tl;dr I think this might be a case-by-case fix. Are there certain websites you notice this breaks on?

@Tang895

Tang895 commented Nov 7, 2025

Copy link
Copy Markdown
Author

Thank you for your reply. I didn’t take cross-site access into consideration.

@Tang895 Tang895 closed this Nov 7, 2025
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

Successfully merging this pull request may close these issues.

2 participants