Skip to content

AnkiDroid: Images pasted into the Image Occlusion 'Note' tab are pasted as base64 #4457

@david-allison

Description

@david-allison

This bloats the collection

Anki source:

https://github.com/ankitects/anki/blob/2d4de33cf3160342c4c704c294e643c3e11071b1/ts/routes/image-occlusion/Notes.svelte

Details

Checked for duplicates?

  • This issue is not a duplicate

Does it also happen in the desktop version?

  • This bug does not occur in the latest version of Anki Desktop

What are the steps to reproduce this bug?

  1. Insert image to Android clipboard. Some gallery apps in Android have a button called "Copy image to clipboard".
  2. Paste the image to a field that is shown in the tab "Notes" of the Image Occlusion editor.
  3. Save changes
  4. Open window Decks
  5. Open Card browser
  6. Tap on the image where you pasted the image
    • At this point, AnkiDroid will take considerable time to show the screen that has the button "Edit Occlusions"

The videos below demonstrate this behavior. All of the videos in this section were recorded in 2.23.0beta4.

In the video below, I create a sample Image Occlusion note. No bug happened.

Screen_Recording_20251203_154945_AnkiDroid.mp4

In the video below, I paste an image to a field that is shown in the tab "Notes" of the Image Occlusion editor. It seems that no bug occurred, but at this point the image has already been stored as base 64 in the field.

Screen_Recording_20251203_155028_AnkiDroid.mp4

In the video below, I edit the note where I pasted the image. It took more than 20 seconds to for AnkiDroid to show the window that shows the "Edit Occlusions". I guess this happens because this note has a field with lots of content: the image encoded in base 64.

Screen_Recording_20251203_155232_AnkiDroid.mp4

Expected behaviour

The image should be inserted as a path instead (behavior in AnkiDroid 2.22.3) instead of being inserted as base64.

The video below shows the behavior when pasting an image in a field of an Image Occlusion note in AnkiDroid 2.22.3. I believe that this should be the behavior in AnkiDroid 2.23.0.

Screen_Recording_20251203_155719_AnkiDroid.mp4

Debug info

AnkiDroid Version = 2.23.0beta4 (367917ada802088c982a8ce11312fbb35d4290c3)  
Backend Version = 0.1.62-anki25.09.2 (25.09.2 3890e12c9e48c028c3f12aa58cb64bd9f8895e30)  
Android Version = 15 (SDK 35)  
ProductFlavor = full  
Device Info = samsung | samsung | gta4xlswifi | gta4xlswifixx | SM-P620 | s5e8825  
Webview User Agent = Mozilla/5.0 (Linux; Android 15; SM-P620 Build/AP3A.240905.015.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/142.0.7444.102 Safari/537.36  
ACRA UUID = a32527bb-1a56-4c2f-92a8-65ce53ea03ff  
FSRS = 5.1.0 (Enabled: false)  
Crash Reports Enabled = true

(Optional) Anything else you want to share?

I can confirm that the image is stored in base 64 because I installed Anki 2.22.3 and visited the Anki data directory that contained the note which I created using 2.23.0beta4.

Image

https://upload.wikimedia.org/wikipedia/commons/1/1b/Using_AnkiDroid_2.22.3_to_view_a_note_created_by_AnkiDroid_2.23.0beta4.webm

Research

  • I have checked the manual and the FAQ and could not find a solution to my issue
  • (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions