seo-by-rank-math
seo-by-rank-math copied to clipboard
Undefined array key 'width' for SVG logos
Describe the bug When a logo of type SVG is set, the error Undefined array key "width" is thrown. This is due to the Wordpress function wp_get_attachment_metadata(...) returning fewer array elements for SVG images. The error is thrown in .../plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php:476
To Reproduce Set an SVG image in Rank Math SEO > Titles & Meta > Local SEO > Logo and reload the front page.
Expected behavior No error
Additional context Add any other context about the problem here.
Hi @Dead-Man-Walker
We couldn't reproduce this issue on our setup. Maybe some plugin or theme on your site is changing the metadata using wp_get_attachment_metadata
filter? Can you please test this by disabling all the plugins and with default WordPress theme?