• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Changing property="og:image" mqdefault.jpg

Started by khanowner,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

khanownerTopic starter

Hi Alex,

I want to change
<meta property="og:image" content="https://i.ytimg.com/vi/C2oROu5rZcM/mqdefault.jpg" />
with
<meta property="og:image" content="https://i.ytimg.com/vi/C2oROu5rZcM/hqdefault.jpg" />

Because I have a problem with facebook. When I have posted my site's video url, facebook get wrong photo for thumbnail (it gets my advertise's picture).
mqdefault.jpg's size is smaller then hqdefault.jpg. Facebook select my advirtese picture, because youtube mqdefault.jpg size is smaller then 200x200 pixels.

Can you help me ASAP.

Thanks.
  •  

PHPVibe A.

Hi, please use the search, you'll have no wait time.

Quote from: @Mario on
Hi,
you are correct.
But take in consideration your are loading hq images in every video loop in your site, this is bad for your website's load.

May I suggest something?
Reverse the change and do this in tpl.globals.php:

<meta property="og:image" content="'.thumb_fix($video->thumb).'" />



changed to


<meta property="og:image" content="'.thumb_fix(str_replace("mqdefault.jpg","hqdefault.jpg",$video->thumb)).'" />


Similar topics (7)