Skip to content

Fix external images when local media caching is disabled - #563

Closed
brozkeff wants to merge 1 commit into
splitbrain:masterfrom
brozkeff:fix/external-images-no-cache
Closed

Fix external images when local media caching is disabled#563
brozkeff wants to merge 1 commit into
splitbrain:masterfrom
brozkeff:fix/external-images-no-cache

Conversation

@brozkeff

Copy link
Copy Markdown

Summary

  • Preserve the original external image URL when DokuWiki media caching is disabled or fails.
  • Pass the resolved target through both mPDF asset path arguments.
  • Add a regression test using an ownCloud-style external image URL.

This restores the fallback behavior lost during the mPDF 8.2 migration.

Fixes #562.

Developed and diagnosed with assistance from GPT-5.6-sol.

Test plan

  • External images render in generated PDFs with fetchsize = 0.
  • PHP syntax checks pass.
  • Git diff validation passes.

When DokuWiki's fetchsize disables external media caching, retain the original remote URL instead of falling back to the wrapped fetch.php URL. Pass the resolved target through both mPDF asset path arguments.
@splitbrain

Copy link
Copy Markdown
Owner

no. the issue is that media_get_from_URL() doesn't do what it says when fetch size is 0. you pass the URL on to mpdf which just hands it back to us to be downloaded. all that is needed is to internally set fetchsize here and make the code work as intended.

@splitbrain splitbrain closed this Aug 24, 2026
@brozkeff

Copy link
Copy Markdown
Author

OK, I already see the the proper path at #564 and can confirm that PR works fine.

@brozkeff
brozkeff deleted the fix/external-images-no-cache branch August 26, 2026 12:32
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.

Regression (mPDF 8.2 since 5da2fd3): external images missing from generated PDFs

2 participants