The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Image URL conversio...
 
Share:
Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

Image URL conversion without link

2 Posts
2 Users
0 Reactions
1,279 Views
Posts: 15
 igor
Topic starter
(@igor)
Eminent Member
Joined: 5 years ago

Hi Guys!

Is there a way to show converted URL images without the source link?

Thanks in advance.

1 Reply
Alina
Posts: 71
Moderator
(@alina)
Member
Joined: 6 years ago

Hi @igor,

Please put the following  code in the functions.php file of the active theme:


add_filter('comment_text', function ($content, $comment, $args = []) {
$wpdiscuz = wpDiscuz();
if ($wpdiscuz->isWpdiscuzLoaded) {
$content = preg_replace_callback('@src\s*=\s*"(.+?)"@is', function ($matches) {
$file = get_headers($matches[1], 1);
return 'src="data: ' . $file['Content-Type'] . ';base64,' . base64_encode(file_get_contents($matches[1])) . '"';
}, $content);
}
return $content;
}, 999, 3);

Please don't forget to delete all caches and press CTRL+F5(twice) on the frontend before checking.

Also please note the code provided above will change all images as you describe in the post above.

Reply
Share: