Same problem here. The expected user behaviour would be to either not convert the image to base64 encoding, but save it like with the attach feature or wp editor in the backend, or disable the option that allows pasting of images into the wp editor field.
[Solved] Uploaded images don't appear in comments
Don't you think that is a bit confusing and feels like a bug when somebody who is commenting wants to place an image at a certain spot in his comment, sees he can do it because the image appears at the right place and when he posts it he only sees garbage?
I would say this is definitely not expected behaviour.
In the near future, if it possible we will check and try to fix it.
2. You say it works as expected with the upload button. No it doesn't. It only works now because I have turned off my Litespeed server and it runs now as Apache only. When turning on Litespeed server it only uploads some small images. That means for some reason it is not compatible with Litespeed server. I will certainly not turn off Litespeed forever only to make it compatible with this plugin.
Maybe the Litespeed made some restriction for the uploaded image. If it possible check it yourself. In another case please contact to Litespeed server support and ask them this question.
ad 1. Pasting the image directly into the post:
What I really do not get is that you already have that working here in your forum software. Is it really so hard to implement the same function in the comments?
ad 2. Incompatibility with Litespeed server:
I will contact Litespeed but I doubt they will change their server software just because a plugin doesn't work. I never had a problem with uploading images with any other plugin and I tried a lot of them.
Copying and pasting an image into the comment works like a charm here in your forum, but as @ventilator reported and we experience as well, it outputs garbage in WpDiscuz (with the Media premium plugin).
So we'd like to either have it working, or not have copy-paste images supported if it's not going to work as expected.
As I already mentioned in the post above, in the near future, if it possible we will check and try to fix it.
@elvina Thank you for your response! That is great to hear 🙂
If you know of any workarounds in the meantime (any manual code fixes we could implement) to address this let me know!
Currently, there is no simple solution I can post here. Please wait, I will update the topic once I get some new for you.
I'm sorry but this is not planned. The copy/paste of an image insert base64 hashed large information in the comment editor. The comment editor is not designed for such large information. You can attach files instead of copy/paste.
@tomson just to clarify, we are not requesting the feature of being able to copy and paste images into the editor. Just to be more clear about our problem:
Steps:
1) copy an image
2) paste it in a Discuz comment with the media upload plugin
Expected:
If this feature is not supported, then nothing should happen.
Observed:
The image DOES SHOW in the comment, as if it was pasted. Then when you submit the comment, it looks like gibberish.
So the solution should ideally be EITHER 1) implement the feature, which as you said it won't happen, that is fine, OR 2) not have this weird copy paste behavior, which is not natural to Wordpress and is counter-intuitive to the user -- if the commenting area lets them copy and paste images, then it should also save them, don't you think?
@tomson expanding on my response, if it helps clarify what the problem is, see this screenshot here: https://www.screencast.com/t/rmKfP9StM
2) not have this weird copy paste behavior, which is not natural to Wordpress and is counter-intuitive to the user -- if the commenting area lets them copy and paste images, then it should also save them, don't you think?
It seems this is a cache issue or you're using the old version of the plugin. You should update the plugin to the latest version and properly delete all caches.
Currently, if the pasted image has an absolute URL like this one:
https://example.com/images/mypic.jpg
it'll be automatically converted to an image when a comment is displayed if the option called "Image Source URL to Image Conversion" is enabled. The option is located in the Dashboard > wpDiscuz > Settings > Comment Content and Media admin page. In short, using this option you can enable/disable image URL to image HTML conversion.
If the pasted image has the following code:
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
it'll be automaticcly removed.
@astghik we are on the latest version, and tried your steps with the same issue (image being saved as base64).
Just to clarify, we are not pasting an image URL. That works fine. What users do is they copy an image in their computer and paste it into the commenting area. The expected behavior should be to either nothing happen, or to have the image properly uploaded.
Could you please do these same steps in your own instance?
1) copy an image to your clipboard
2) paste it into a WPDiscuz commenting field (with the Media Plugin enabled)
Tell me what you see. This is what I see
Then when the comment is saved, there is this HUUUGE base64 gibberish in the comment.
@astghik I can't replicate this issue in your link. So strange.. we are still experiencing this issue with "Import Source URL to Image Conversion" activated: https://www.screencast.com/t/JsiCWeeBf
I don't know what else to do. We are not altering the behavior of the commenting area in any way.
@astghik from further research, it seems Wp Discuz users Quill Editor, and this is an issue raised on their Github here as long as the solution which is to exclude `image` from the formats allowed: https://github.com/quilljs/quill/issues/1108
@astghik it's https://academy.zenva.com, but the commenting area is behind a paywall.
If you could provide me with an email address, we could email you a free access code so you can see it.
@astghik thanks for your help, I have just emailed you the testing users login details.
You're not using the latest version of the wpDiscuz plugin. Please update the plugin to the latest version (v. 7.1.0), delete all caches and check again.
Please open a new support topic and provide more information and screenshots. It's hard to support multiple cases in the same topic. Your posts will be removed soon from this topic.
@astghik sorry for the late reply - it took us a few days to update the site again. We now upgraded to 7.1.0, cleared the cache, and the issue is still present. You can see a screenshot here: https://www.screencast.com/t/rvCRjudY
Plugins we have: https://www.screencast.com/t/OF32YOtIb
@astghik you already have access to the commenting area. Unfortunately, we can't give you admin access to the site, as it contains our customer data. Happy to provide any info or configuration screenshots you may require.
We don't find such an issue on our test websites. Could you please create a dev/staging copy of your website in some sub-domain? Remove all information that you don't want to share, make sure the problem exists and send admin details to us? You can use Duplicator to create that site.
@astghik thanks for offering to help. We will do this and let you know. Please allow for a week or so.
@astghik I can confirm that it's all working fine now. It seems when we updated to the latest, the cache somehow didn't clear properly (we've had a lot of issues with FVM lately). We can no longer experience the copy & paste image bug, so feel free to close the ticket. Thank you for your help with this!!
- 64 Forums
- 6,688 Topics
- 32.1 K Posts
- 16 Online
- 35.3 K Members

