• Resolved SocialSparkMedia

    (@socialsparkmedia)


    I’m using an svg file in the footer of the Astra theme and it’s displaying the image huge. I’m using it in the header and it’s working fine. Here’s my code:
    Indigo Ridge Logo

    The preview in customizer looks fine, but when I look at an actual page (after clearing the cache) it’s big again. When I inspect, it’s showing height and width as 100%. My site has a password because it’s in staging, so maybe you can see what you need in this inspector screenshot:
    https://www.screencast.com/t/PUDeSBgDY

    I’m using Beaver Builder with the Astra theme, but the code is actually in the theme customizer, not BB. Here are my settings for your plugin. https://www.screencast.com/t/oRYvMVlH

    Thanks for your help.
    Fran

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi there,

    Thanks for using my plugin ??

    You shouldn’t need the last setting “Force Inline SVG”.. This renders them as SVG code and not as a regular image… and it will do it to ALL SVG files on your site. It’s a blanket approach for some older page builders that isn’t really needed anymore and for sites where every single SVG is meant to be inline.

    With that setting off, it will act as a normal image in the sections you put them in. And if there’s any size issues, you can just use CSS to tell it what size to be.

    Try flicking that setting off first and let me know. Happy to give you some CSS if that doesn’t work. Just shoot me a screenshot from the inspector after that setting is off.

    Thread Starter SocialSparkMedia

    (@socialsparkmedia)

    Thanks for the suggestion, unfortunately it didn’t work. (I cleared both WPEngine cache and the BB cache a couple of times). Here’s a screenshot of the inspector. I see where for g #id it says <rect x=”-62.78″ y=”-28.816″ width=”1000.11″ height=”265.76″ style=”fill:none;”></rect> Could that be the problem?

    https://www.screencast.com/t/Y81ZisT7Q

    I do have the style=”width: 237px; height: 118px;” When I edit it to another size, it looks fine in the preview in customizer, and then it goes back to huge. I tried to create a new footer using Beaver Themer instead of the Astra Footer builder to see if it was something in there that was causing it, but the same thing happened.

    It works fine in the header, so I can’t imagine what’s causing this! If you need to see the actual site, if you can PM me somehow I’ll give you the password. Thanks so much for your help.

    Plugin Author Benbodhi

    (@benbodhi)

    If you are not intentionally making the svg render inline, something is still caching it. CDN maybe?
    That code you see is the internals of your svg. But I think you don’t need to render it inline at all. It can just be used like a normal image.

    You could turn off advanced settings in my plugin all together, then we’re sure it isn’t being forced inline. If it still shows up as the svg code like this instead of an img tag with the svg file as the src, then it must be a cache/cdn issue keeping the old page.

    You can use css to size the inline svg still no problem, but if you don’t need it inline, I’d try to get to the bottom of why it still displays inline. It’s likely that it will display normally when used like a normal image.

    • This reply was modified 3 years, 3 months ago by Benbodhi. Reason: Phone thumbs spelling mistakes
    Plugin Author Benbodhi

    (@benbodhi)

    Glad you got it working how you’d like without advanced mode on.

    Please don’t hesitate to open another thread if you have any further issues.

    And thanks for your kind review ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘image is large even with width & height’ is closed to new replies.