What's happening: I'm using react-quill as a text editor and it works well, except when I upload an image via my backend, it renders blurry/pixelated on my frontend.
Expected: Renders with equal quality from backend to frontend.
The following are my results:
Firebase saves the image as a huuuuuge base 64 number -- over 70k characters.
Does anyone know how to handle this?
Edit: Something I thought of is maybe a custom upload button that would first save the image to firebase storage then replace that base64 string with the path to that image in firebase storage?
Edit2: I'm saving the state of the editor to give to firebase via the backend with content: this.state.editorHtml
and do a database.ref().child('articles').set(data)
. I then render it on the frontend with data.get('content)
Edit3: I'm rendering the images to the frontend with import HTMLView from 'react-native-htmlview'
in a tag <HTMLView value: {data.get('content')} />