I’m having the same issue on my website. Following this thread for a response. I’m using the Yoast plugin to generate my sitemap.
[27-Nov-2023 18:36:37 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Visual_Portfolio_Sitemap::add_images_to_sitemap(), 1 passed in /home/snowhome/public_html/wp-includes/class-wp-hook.php on line 326 and exactly 2 expected in /home/snowhome/public_html/wp-content/plugins/visual-portfolio/classes/class-sitemap.php:69
Stack trace:
#0 /home/snowhome/public_html/wp-includes/class-wp-hook.php(326): Visual_Portfolio_Sitemap->add_images_to_sitemap(Array)
#1 /home/snowhome/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#2 /home/snowhome/public_html/wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemap-image-parser.php(127): apply_filters(‘wpseo_sitemap_u…’, Array, 1155)
#3 /home/snowhome/public_html/wp-content/plugins/wordpress-seo/inc/sitemaps/class-post-type-sitemap-provider.php(673): WPSEO_Sitemap_Image_Parser->get_images(Object(WP_Post))
#4 /home/snowhome/public_html/wp-content/plugins/wordpress-seo/inc/sitemaps/class-post-type-sitemap-provider.php(235): WPSEO_Post_Type_Sitemap_Provi in /home/snowhome/public_html/wp-content/plugins/visual-portfolio/classes/class-sitemap.php on line 69