0

I have installed ng2-ckeditor. I wanted to know how i can get the images added to the editor to be converted to base64 and appended to the image tag.

https://ckeditor.com/cke4/addon/base64image was added with the intent to help with the conversion but is there another way to just convert the images to base64

<img alt="" 
src="data:image/jpeg;base64,/9j/4QZJgABAgEYAgA/7gA.......9g+3iXJ//Z" />

i wanted to appened the base64 to the tag as displayed above

Coder.exe
  • 161
  • 1
  • 10

1 Answers1

1

I would suggest to use relative path instead of base64 string. When relative path cannot be used you can convert the image to base64 string as describet here. When you work with ng2-ckeditor you can convert your image in angular code.

zimny
  • 136
  • 1
  • 8
  • can u elaborate how i can convert it do i need to add a plugin or is there a way to access the image handler? – Coder.exe Apr 30 '19 at 05:05
  • You can convert the image in TypeScript as shown [here](https://stackoverflow.com/a/42483385/2795402) – zimny Apr 30 '19 at 17:40