citizenos / ep_image_upload

Add images to etherpad and upload them to Amazon S3
Other
9 stars 16 forks source link

images uploaded with ep_copy_paste_images are not displayed #37

Closed zzkt closed 2 years ago

zzkt commented 3 years ago

I've recently upgraded to ep_image_upload from the ep_copy_paste_images plugin, and looks like images that have been added to a pad using the old plugin are not displayed correctly. The image data is still there and it can be fixed manually.

The exported html includes the complete img tag as src like so

<img src="<img src="data:image/jpeg;base64 ... ">">
JohnMcLear commented 3 years ago

This is expected.

To fix you could just do a .replace of that string within the image attribute. It's a one liner fix if someone wants to do it. Images should not be stored with surrounding html tags in database tho so fixing output is one thing but ideally replacing all strings in database would be the solution.

I'm not gonna get time for this one.

zzkt commented 3 years ago

That's how i fixed it locally with a few tweaks for some edge cases. thought it worth mentioning here but didn't want to submit a patch which might cause more problems...