When uploading an invalid image file in the editor the error isn't handled in the frontend so what ends up happening is that a broken image is inserted into the editor.
To reproduce: Take any non-image file and rename the extension to .jpg and upload it as an image.
When uploading an invalid image file in the editor the error isn't handled in the frontend so what ends up happening is that a broken image is inserted into the editor.
To reproduce: Take any non-image file and rename the extension to .jpg and upload it as an image.
Likely the code-entrypoint that needs to be improved is here where we currently just log the error but take not further action: https://github.com/sydevs/WeMeditate/blob/9eb86afa0f085b08c35ae8bfe09ce3f31e7032e8/app/assets/javascripts/admin/cdx-editor/image-uploader.js#L83-L85