How to fix WordPress images not showing up in local hosted XAMPP server?

get_template_directory() Retrieves the absolute path to the directory of the current theme, without the trailing slash.

You should use get_template_directory_uri(); for showing correct image path on site.

echo get_template_directory();?>/library/images/name_of_the_svg_image will work in your case.

Details here