Extracting base64 encoded images from HTML

Oh dear base64 encoded images in the main content.

that also happened when you copy /paste content with images from Word into a Tinymce widget.

Iirc @mauritsvanrees wrote a proof of concept some years ago (or longer) which extracts those images into separate Image content items on save. Classic UI. Let me search.

Found it, 4 years ago: GitHub - collective/collective.base64imagepatch: Assuree that no inline base64 encoded image is stored in an RichtTextField

Maybe suitable to grab some code from :wink:

1 Like