The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] How much control over images posted by users in a comment is there ?
How-to and Troubleshooting
(@adamtheforumuser)
Estimable Member
Joined: 5 years ago
Out of the box how much control of this do I have?
I see that in one post on our comments system (search for the text "lots of praise but to my eyes") you will see images appear and they are basically at 100% width of the space for comments.
Is that default handling or is that our own CSS playing around with this overriding defaults ?
What we'd like is small thumbnails that float / wrap neatly within the paragraphs.
(@adamtheforumuser)
Estimable Member
Joined: 5 years ago
Just to check, this doesn't support cropping ? If I remove the 'auto' value I see and set both dimensions to say 100px, it's going to distort the image ?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8195
Oct 19, 2021 9:21 am
@adamtheforumuser,
You can set the value of height option as auto and just configure the width.
(@adamtheforumuser)
Estimable Member
Joined: 5 years ago
Hmmm I've changed the settings to make width 200px but it doesn't seem to have done anything.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8195
Oct 19, 2021 10:17 am
@adamtheforumuser,
Have you deleted all caches before checking (website, wpDiscuz, browser)?
(@adamtheforumuser)
Estimable Member
Joined: 5 years ago
Yes, we had local wp cache app and cloudflare but I've cleared both.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8195
Oct 20, 2021 10:14 am
@adamtheforumuser,
We see the images are added via the URL, there were not uploaded via standard wpDiscuz upload setting. Please try this CSS solution:
#wpdcom a > img {
width: 150px;
display: block;
}
The red marked value can be changed as you like.
Put the code in the Top Admin Bar > Customize > Additional CSS > "Additional CSS" textarea, save it, delete all caches and check again.
(@adamtheforumuser)
Estimable Member
Joined: 5 years ago
Ah so you are saying that the user coded the image tags themselves in their comment, rather than using the interface to 'upload' ?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8195
Oct 20, 2021 11:41 am
@adamtheforumuser,
If you press CTRL + C on the image or simply copy the image from some contend and paste it in the comment area, It'll be embedded in the comment content. Please watch this video.
https://www.screencast.com/t/mBKyrQZO9hV
If I press post a comment button, the image will be embedded in the comment content. You can check it yourself.
The option that controls this called "Image Source URL to Image Conversion". More info here: https://wpdiscuz.com/docs/wpdiscuz-7/plugin-settings/comment-content-and-media/
(@tiedjetrading)
Joined: 1 year ago
Active Member
Posts: 8
Aug 20, 2024 7:21 am
@asti That's exactly what I need. However, if I insert an image in the comment function with STRL + C, I see this in the comment area, but after posting the image appears as text.
data:image/jpeg;base64,/9j/4R7uRXhpZgAATU0AKgAAAAgABwESA...
How is it possible to render such images in the comments?
(@tomson)
Joined: 10 years ago
Honorable Member
Posts: 506
Aug 22, 2024 7:13 am
@tiedjetrading,
I think this is an image-specific issue. Where are you copying the image from? It seems the image is displayed as base64 encoded content from the source where you’re copying it.
(@tiedjetrading)
Joined: 1 year ago
Active Member
Posts: 8
Aug 22, 2024 5:34 pm
@tomson This code appears when I copy it directly from the computer. When I copy an image from the web to the clipboard, nothing is pasted.
What else could I do to find the error? I need the normal paste function when I copy an image from the web.
(@tomson)
Joined: 10 years ago
Honorable Member
Posts: 506
Aug 22, 2024 7:21 pm
@tiedjetrading,
I'm sorry but the comment form is not designed to copy image from PC and paste to the form. wpDiscuz has image attachment button so you can use it. For an advanced features you can check out the wpDiscuz Media Uploader addon: https://gvectors.com/product/wpdiscuz-media-uploader/