How do I include SVG file used as featured image?
I'm new, can I use include() or get_template_part to load an SVG file uploaded as featured image directly in the HTML page?
I need to animate the svg images, but i need to easily change the image on each page.
I have tried this code but does't work, I can't find the right path, I can load only the svg images in the same folder.
$domain = get_site_url();
$svg_url = get_the_post_thumbnail_url(get_the_ID());
$svg = str_replace( $domain, '', $svg_url );
echo $svg; //only for read the url
get_template_part($svg);
// or
inlcude $svg;