• My PHP error log is 1GB is size, full of the following error:

    Undefined array key “height” in /home/customer/www/website.com/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php on line 480

    PHP 8.2.35
    RankMath Version 1.0.280
    WordPress 7.1.4

    edit: This appears to be due to having an SVG set at the site logo in Rank Math’s Local SEO settings. Changing it to a PNG or JPEG resolves the issue.

    • This topic was modified 2 days, 6 hours ago by solutioinc.
    • This topic was modified 2 days, 5 hours ago by solutioinc.
Viewing 1 replies (of 1 total)
  • Good catch on the SVG. WordPress doesn’t store width/height in the metadata for SVG uploads, so when Rank Math builds the logo ImageObject for the schema there’s no height key to read and it throws that notice on every single page load. That’s how you get to 1GB.

    Couple things worth doing now that it’s fixed. Empty that log (rename it or truncate it, it won’t come back on its own) so it isn’t eating your SiteGround disk quota. And for the PNG, Google wants the logo at least 112px square, so give it something around 512px and it’s happy in rich results too.

    If you’d rather keep the SVG on the front end, you can still use it in the theme header and just point the Local SEO logo field at the PNG. Rank Math would probably want to hear about this one too so they can add an isset check on that line.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.