Use a vector (svg) image as site logo
-
I’ve just started to build my first website using the VEGA theme. It’s a fantastic theme that perfectly suits my needs. Now I would like to add my site logo as a vector image, using the SVG Support plugin. I got it working in the footer column 1 widget with this code:
<embed src="https://www.snellecursus.nl/ontwikkelomgeving/wp-content/uploads/2016/11/Snelle1.svg" type="image/svg+xml" />
But when I select the svg image in Customizer->Site Identity->Logo it doesn’t work.
After searching in the various theme files I found header-logo.php and changed this code:
<img src="<?php echo esc_url($vega_wp_logo_image) ?>" alt="<?php bloginfo( 'name' ); ?>" />
into this:
<div style="width: 165px; height: 45px;"><embed src="https://www.snellecursus.nl/ontwikkelomgeving/wp-content/uploads/2016/11/Snelle1.svg" type="image/svg+xml" /></div>
Now it shows the svg image as logo, but sometimes the logo disappears or it loads very slowly.
Is there a more elegant way (using the VEGA child theme) to achieve this?Thanks.
- The topic ‘Use a vector (svg) image as site logo’ is closed to new replies.