Generate branded OG images for every WooCommerce product page automatically. Works alongside Yoast WooCommerce SEO.
Start Generating FreeWorks alongside your existing SEO setup without conflicts.
Uses product name and details for automatic dynamic previews.
Just add to functions.php — no database changes needed.
Add this snippet to your child theme's functions.php:
<?php
// Add to your child theme's functions.php
function imago_woo_og_image() {
if ( is_product() ) {
global $product;
$title = rawurlencode( $product->get_name() );
$api_key = 'YOUR_IMAGO_API_KEY';
$og_url = "https://imagoapi.com/api/og/generate?title={$title}&template=modern&api_key={$api_key}";
printf( '<meta property="og:image" content="%s" />' . PHP_EOL, esc_url( $og_url ) );
printf( '<meta name="twitter:image" content="%s" />' . PHP_EOL, esc_url( $og_url ) );
}
}
add_action( 'wp_head', 'imago_woo_og_image', 5 );
Join thousands of WooCommerce stores using Imago API for stunning OG images.
Start Free Trial