Hi all, how can I implement an og:image into my website?
Best regards,
Oliver
Hi all, how can I implement an og:image into my website?
Best regards,
Oliver
Albums should handle it automatically.
Which modules are you asking about, and what page and/or page type?
Hi Matt,
thank you for your quick response.
Claude managed it this way:
function head() {
$currentPath = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$ogImages = [
'/architectural-photography' => 'https://theraumphotography.com/assets-image/og/architectural-photography.jpg',
'/real-estate-photography' => 'https://theraumphotography.com/assets-image/og/real-estate-photography.jpg',
'/photogrammetry' => 'https://theraumphotography.com/assets-image/og/photogrammetry.jpg',
];
$ogImage = $ogImages[$currentPath] ?? 'https://theraumphotography.com/backlight/designer/page/image/170';
echo "<meta property=\"og:image\" content=\"{$ogImage}\">\n";
echo "<meta property=\"og:image:width\" content=\"1200\">\n";
echo "<meta property=\"og:image:height\" content=\"630\">\n";
echo <<<HTML