Skip to content

Commit

Permalink
feat: add ogimage minify warning
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Mar 20, 2024
1 parent 203c833 commit 1bbfd4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -2753,13 +2753,16 @@ private function configSEO($inputfields)
$url = $http->getResponseHeaders('location') ?: '/';
$dom = rockfrontend()->dom($markup);
$ogimg = $dom->filter("meta[property='og:image']")->count() > 0;
$minifyWarning = strpos($markup, "property=og:image") === false
? "" : "It looks like you are using ProCache's remove quotes from tag attributes feature - this feature will break WhatsApp preview images on Android! See [this forum post](https://processwire.com/talk/topic/29831-why-does-whatsapp-not-show-a-preview-image-for-my-site/?do=findComment&comment=240133)";
$fs->add([
'type' => 'markup',
'label' => 'og:image',
'value' => $ogimg
? "$check og:image tag found on page $url"
: "$warn no og:image tag on page $url",
'columnWidth' => 50,
'notes' => $minifyWarning,
]);

$hasFavicon = $http->status(
Expand Down

0 comments on commit 1bbfd4a

Please sign in to comment.