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] externalimages build process destroy jpg file #4556

Closed
linonetwo opened this issue Apr 13, 2020 · 2 comments
Closed

[BUG] externalimages build process destroy jpg file #4556

linonetwo opened this issue Apr 13, 2020 · 2 comments

Comments

@linonetwo
Copy link
Contributor

Describe the bug
I tried running following custom "externalimages" build process on local machine:

        "externalimages": [
            "--setfield",
            "[is[image]]",
            "_canonical_uri",
            "$:/core/templates/canonical-uri-external-image",
            "text/plain",
            "--setfield",
            "[is[image]]",
            "text",
            "",
            "text/plain",
            "--rendertiddler",
            "$:/plugins/tiddlywiki/tiddlyweb/save/offline",
            "index.html",
            "text/plain"
        ],

And it makes xx.jpg 's content changed to �w^~)�

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/linonetwo/Meme-of-LinOnetwo/tree/beeff69eb1ba9c93e0fac24d4c0d0384a82ab88c
  2. npm i
  3. npm run build
  4. See error in ./MemeOfLinonetwo/tiddlers/webcatalog-tiddlywiki-menu-app.jpg

Expected behavior
The build process should not change the file inside tiddlers, it should be a pure function without side effect.

Screenshots

Screen Shot 2020-04-13 at 11 52 03 AM

Desktop (please complete the following information):

  • OS: MacOS 10.15.4 (19E287)
  • Browser: Firefox 74.0.1 (64-bit)
  • Version: TW 5.2.1

Additional context
I use image uploaded to Github as src for img, so I just let generated HTML have _canonical_uri.

@KendrickLamarck
Copy link

Possible duplicate of #4484

@linonetwo
Copy link
Contributor Author

Sorry for duplicate...

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