Home › Forums › Support › SVG image attributes This topic has 4 replies, 2 voices, and was last updated 3 years, 8 months ago by Tom. Viewing 5 posts - 1 through 5 (of 5 total) Author Posts August 26, 2018 at 6:08 am #660251 Daren When using svg images how do you add the width and height attributes, I added the image with the customizer. Mine <img class="header-image" alt="dotmycom" src="https://dotmycom.com/wp-content/uploads/site-logo.svg" title="dotmycom"> Yours <img src="https://generatepress.com/wp-content/themes/generatepress_official/images/logo.svg" alt="GeneratePress" width="254" height="48" class="header-image"> GeneratePress 2.1.4GP Premium 1.7.2 August 26, 2018 at 9:22 am #660443 TomLead Developer Lead Developer Hi there, You can just use CSS: .header-image { width: 254px; height: 48px; } Let me know if that works for you or not 🙂 Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development August 26, 2018 at 10:58 am #660519 Daren I know you can use css, I was wondering how yours prints directly to the <img tag. August 26, 2018 at 12:50 pm #660564 Daren That did fix my issue without JS. I did find though using JS inputs them to the attr directly. $( '.header-image' ).attr( { 'height': '150', 'width': '450' } ); Thanks August 26, 2018 at 8:06 pm #660723 TomLead Developer Lead Developer You should have access to the HTML, but that depends on how you’re adding the logo. However, using CSS is just as effective. Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development Author Posts Viewing 5 posts - 1 through 5 (of 5 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In