My full solution:
1- Backup your Q2A directory and clone it to test on a different installation.
2- Optional: install the latest Ckeditor, head to your q2afolder/qa-plugin/wysiwyg-editor, rename the ckeditor folder to something like ck-, download the version that suits you from here, or even add more plugins using the customize option via the online builder (I personally added code editors and other fancy stuff) https://ckeditor.com/ckeditor-4/download/#ckeditor-4-lts
Then extract the new ckeditor folder from that zip, in the qa-plugin/wysiwyg-editor folder in lieu of the old one.
@todo feel free to merge with old style.js/config.js from the included editor
3- Now head over to your (new) qa-plugin/wysiwyg-editor/ckeditor, modify config.js content to the following:
CKEDITOR.editorConfig = function( config ) {
config.extraPlugins = 'uploadimage';
config.uploadUrl = 'uploader.php';
};
if you already have content inside your editorConfig block, do not overwrite it! Just add these extra 2 lines above.
This config option tell ckeditor to treat pasted images with the uploadimage plugin, and to proceed to uploading them via the uploader.php script (that we will create in the next step)
4- now head to the root of your q2a installation and create the uploader.php file and create a folder with write permissions to your webserver call it "uploads"
and put the following in your uploader.php
https://pastebin.com/JgHPhNa2
5- if you followed everything correctly, your new editor will now paste <img src=...> tags with a url to your image instead of massively long base64
Alternatively, you can use a (paid) service like their https://ckeditor.com/docs/ckeditor4/latest/guide/dev_easyimage_integration.html
It is easier to configure; no need to write the uploader.php file, but you do not host the images yourself locally, they are stored on their servers, which depending on your use-case and might be a good or a bad thing (privacy constraints/regulations, etc).
- Please follow carefully, make sure to test on a test environment before your production server.
- Make sure to understand what you do, and read before pasting/clicking things.
- I am not responsible if you break your website.
I am no expert in q2a, just shared the way I solved a problem so that people can use it for inspiration and possibly more knowledgeable people will post comments and improvements !