Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Summernote - Image url instead of Base64

Tags:

php

summernote

Summernote wysiwyg editor encodes image files into Base64. Well, this seems handy but I expect the DB to be used quite heavily for a long term. This will cause some issues - searching slow, implementing image library, and etc...

I wonder if it has a option to turn this encoding option off and use 'inserting url' method intead. I've been looking for it but no great success yet.

For example, instead of storing images like...

<img style="width: 640px;" src="data:image/jpeg;base64,/9j/4Qv6RXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAeAAAAcgEyAAIAAAAUAAAAkIdp...............>

it should be...

<img src="/images/blah/blah.jpg.">

Any documentation? or any examples to refer?

Thanks !

like image 567
Raccoon Avatar asked Dec 22 '14 10:12

Raccoon


1 Answers

You need to write custom function for onImageUpload().

I was looking for a solution. Found this: Summernote image upload

like image 130
Raghavendra N Avatar answered Nov 15 '22 13:11

Raghavendra N