TiddlyWiki retaining internal image -- (bug?)

I had an image that I had dragged/dropped. Then I color-inverted the image, and made it into a _canonical_uri image. But when I try to display the image through image wikitext, it displays the old image – not the new image.

The effect is highly persistent, continuing between reloads, different browsers, and different host/save mechanisms. It appears that the original image is lodged in TW somewhere, and it won’t acknowledge the new image. The effect survives even if I try to sneak up on it and rename the tiddler and the tiddler image link.

In the following, you can see what the image is supposed to look like at the top, and then see how it is actually displayed below and the wiki-text that invokes it.

I don’t know if this is the same phenomenon as this:

  1. In edit mode, draw an image (for example of .png type).
  2. Add also a _canonical_uri field with a url suitable for that, for example
    https://cdn.pixabay.com/photo/2020/11/15/18/51/cat-5746875_1280.png
    and save the field. This will make the drawing “disappear” (but the type field will remain).
  3. Save the tiddler and note how only the _canonical_uri image is shown.
  4. Go back into edit mode and delete the _canonical_uri… which gives you back the drawn image.

Your initial phrase that

…seems to indicate you’ve played around with both an image and the _canonical_uri field, so maybe what I describe above is what has happened? I.e you’re not really showing the image you think you’re showing.

Yeah! That’s it. But I would consider this a bug, since the image wikitext should be showing the _canonical_uri, not the data-based image. Especially since the tiddler itself gives no clue that it still retains the old image.

I’ve always thought it was one of those “intentional quirks” that made some perfect sense to the big boys like e.g “you don’t want to loose the information in the text field”… but, yeah, maybe it’s really a bug. It has been around forever.

To me it’s a double-bug. Because the whole reason for converting it to an external image is to save space, which can’t be happening if it’s retaining the image.

I recall being a bit surprised by this as well when I first encountered this behaviour and it would be worth updating the documentation to clarify the issue.

If converting a tiddler from a binary (inline) version of an image to one referenced via the _canonical_uri field, the conversion is actually a two step process:

  • add the _canonical_uri field
  • reset the text field to an empty string

The problematic bit is that there is no good UI affordance for resetting the text field and it requires using an action string (or executing commands if on node.js), or deleting and recreating the tiddler.

1 Like

this is a good reference : https://tiddlywiki.com/#ExternalImages . It refers to what saqimtiaz is talking about.

2 Likes