Closed krissbennett closed 9 months ago
Also note that I have tried combination of baseURL and imageBaseURL with same effect. And with and without the markdownImageProvider
Resolved my problem by adding in a custom static var to my package to return its own bundle and then using:
.markdownImageProvider(AssetImageProvider(bundle: MyCustomPackage.bundle))
Thank you for contributing to MarkdownUI!
Before you submit an issue, please complete the report with all the relevant details for your bug and go through every item in the checklist.
Describe the bug I have followed what I believe is the right guidance on loading local images within the Markdown, if I pass an invalid URL for the image I see an error in the console, but even when passing the correct URL, I don't see any errors and image doesn't load.
Checklist
main
branch of this package.Steps to reproduce Explanation of how to reproduce the incorrect behavior. This could include an attached project, a link to code, or a Markdown-formatted text exhibiting the issue.
Simple SwiftUI view
testImage.jpg is in the app bundle
add to view Markdown( """
Title
Run in simulator
Expected behavior Expect to see image loaded from local file
Screenshots Image not loaded so nothing to show
Version information
Additional context Nothing else to add.