Notifications
Clear all

[Solved] Images from forum don't show on the wordpress article comments

10 Posts
2 Users
0 Reactions
1,229 Views
Posts: 5
Customer
Topic starter
(@dexter-deshawn)
Member
Joined: 5 years ago

Hi,

images posted by default registered members on forum don't appear on cross-posted comments on Wordpress, but those posted by moderators/admins are visible. Cross-posted images from Wordpress comments to forum post instead always works for everyone.

Any tips? Thank you and kindest regards.

9 Replies
Astghik
Posts: 6152
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi @dexter-deshawn,

Please provide us some examples. 

8 Replies
Customer
(@dexter-deshawn)
Joined: 5 years ago

Member
Posts: 5

@astghik

Hi, this is a simple registered user posting on WpForo:

https://imgur.com/w9NZFcN

And this is the cross-posted comment on Wordpress:

https://imgur.com/KhfSq4W

As you can see, no attached image. Thanks.

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6152

@dexter-deshawn

Could you please leave example URLs. 

  • with images, made by admin
  • without images, made by regular users
Customer
(@dexter-deshawn)
Joined: 5 years ago

Member
Posts: 5

@astghik

Of course. This is a cross-posted post from the forum made by a regular user, without image:

https://www.cyberpunk2020.it/2019/07/06/in-cyberpunk-2077-non-si-potranno-guidare-veicoli-volanti-ma-si-potra-nuotare/

And this is a cross-posted post made by me (admin), with image:

https://www.cyberpunk2020.it/2019/07/15/cyberpunk-2077-un-libro-illustra-il-mondo-la-lore-del-gioco/

Thanks!

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6152

ok  @dexter-deshawn, thank you. 

I understand the issue. The issue doesn't come from wpForo Blog Cross Posting add-on. This comes from WordPress. It doesn't allow regular users to include the image tag in comment content. This restriction doesn't have an effect on the admin role. Wordpress uses the wp_kses() function.

More info here:

https://developer.wordpress.org/reference/functions/wp_kses/

Please read this question it should be helpful for you.

https://wordpress.stackexchange.com/questions/113762/disallow-img-tag-in-comments

Customer
(@dexter-deshawn)
Joined: 5 years ago

Member
Posts: 5

@astghik

Thank you!

Is there a solution for this problem, do you know of? Another comments plugin, maybe?

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6152

@dexter-deshawn,

I don't think there is some comment plugin that solves this. Haven't you tried the solution form wordpress.stackexchange.com? 

Customer
(@dexter-deshawn)
Joined: 5 years ago

Member
Posts: 5

@astghik

I just added this line at the end of my theme functions.php and now everything works perfectly:

$allowedtags["img"] = array(
"src" => array()
);

Thanks!

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6152

Thank you for letting us know dexter.deshawn,

Glad to hear that the issue is solved. 

Share:
Scroll to top