Unable to copy and paste images from Google Docs and other googleusercontent.com image host, while other editors are able to do so

Describe the bug
I’ve been trying to copy-and-paste content (text and images) from a specific webpage, located at (https://mireiarchive.dreamwidth.org/367.html). Normally, copying and pasting content from a webpage (such as Time is running out for Beijing to prepare its economy for a demographic crisis - CNN) works in Anytype, with all the styling and images being successfully transferred to the object canvas. (Although there seems to be an issue with line breaks, as mentioned here.)

However, with the aforementioned specific webpage, I’ve been unable to do so. This issue seems to be specific to Anytype, as copying and pasting the same content into other text editors, such as Pages, Google Docs, Notion and TextEdit all successfully keep the images and styles intact.


Copying and pasting the content from the webpage successfully preserves images and text styles (bold) in other text editors


However, copying-and-pasting from the exact same clipboard fails to preserve the image and also does not keep the second bold text (“Hajime:”)

To Reproduce

  1. Go to the webpage “https://mireiarchive.dreamwidth.org/367.html” and copy the first few paragraphs of main text - making sure to include an image or two, alongside a bolded character.
  2. Paste the content back into Anytype. The results should exclude the image and some bolded characters.
  3. Paste the content into other text editors, such as Google Docs. The bold (styling) and images should be intact, demonstrating that this is a problem that seems to be specific to Anytype.

Expected behavior
I expected the content, including images and styling, to be correctly pasted into Anytype, as most webpages can do.


Expected behavior when copying and pasting images and text from a webpage to Anytype - styling also intact

System Information:

  • OS: MacOS 12.1
  • Device Manufacturer/Model: MacBook Air Late 2020
  • Anytype Version: 0.22.3

Additional context

Just an update - it also seems like Anytype Android also may suffer from this same issue. Pasting into other alps, such as Microsoft Office and Samsung Notes from the aforementioned page (https://mireiarchive.dreamwidth.org/367.html) is successful, but Anytype isn’t able to insert an image. The bold formatting issue is also present.


However, Anytype Android is able to deal with images from other webpages, such as the CNN article posted in the parent comment…

Some other observations that may be helpful for developers to debug this issue: ((this)[ClipboardViewer] tool is also very useful for debugging clipboard issues)

The images that fail to load are loaded from the *.googleusercontent.com/* domain - no other domain (yet) has had the same issue.

Additionally, I am not entirely sure - but I believe all the image domains that I am having issues with does not contain an image file extension, like .jpg or .png.

Here is an example of image domain that I’m having trouble in when in clipboard HTML format: https://lh4.googleusercontent.com/nW15tk5_IpfZOTsh6_3VuHuC_n1iK3Po_6vde6RllwlGAEpbHD633BSFjcs7ZA5EDOrqwuIUkhbdSAOu12LoLOAIqTZ97ZtjUvN93lpNrqF5zbgNyFwP1rFjtiCpxQjmpLtf_4M . This other image address is from the webpage I’ve reported trouble with in the parent post.

And here is the HTML of the clipboard that doesn’t work to copy image in Anytype. Other editors such as Pages successfully paste the image. However, another quirk is that Anytype cannot paste this image back from Pages into itself, but that’s likely due to Apple’s nonstandard clipboard implementation for their work apps.

<b id="docs-internal-guid-c49a1628-7fff-89f0-974c-e6a300759c05" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; font-weight: normal;"><p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: 400; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">sample text</span></p><br><p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: 400; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="border: none; display: inline-block; overflow: hidden; width: 624px; height: 351px;"><img src="https://lh3.googleusercontent.com/gb-p2sVUi0XEDOXyAIv0Pm6OfrhlJtWALWN-km8ubPcSqJqasChp1UOxn_PluK3TLxDEhMjWw7p0ac7pgvsxo58O8IqhCcfROdYdGyZ4COuunnxT_qm9hcD67p7Fw3FQrA" width="624" height="351" style="margin-left: 0px; margin-top: 0px;"></span></span></p></b><br class="Apple-interchange-newline" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class="Apple-interchange-newline">

@edwards Hi! Thank you for your report, it has been added to the bug tracker

1 Like

Hello! I have discovered more information about this specific issue, and I’ll update the title to match.

Google Docs also seems to be one of the sites that are affected. Trying to copy-and-paste a selection that includes an image will discard the image entirely in Anytype. Other text editors do appear to successfully embed the image, however. One thing that is in common between the site I’ve mentioned in my initial post is that they both use .googleusercontent.com domains for their images, with no file extension.