• lianpb

    (@lianpb)


    WCBRS 2019 Contributor

    We are noticing since updating to 2.4/2.4.1 that our SVGs are appearing at 1px by 1px, we have altered the CSS to compensate but this isn’t ideal for a number of reasons. All SVGs have a set height and width when uploaded and we have tried alternative exporting methods to see if this was the cause.

    We have opted to downgrade a number of our sites. Please could you advise if there is an upcoming fix for this?

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

    (@benbodhi)

    Hi there,

    I just pushed an update (2.4.2) that may have addressed this issue for you. There was an issue with srcset which may have been affecting you.

    Let me know.

    Thread Starter lianpb

    (@lianpb)

    WCBRS 2019 Contributor

    Hello @benbodhi

    I have just tried updating the 2.4.2 and unfortunately i’m still getting the same issue when the images are appearing at 1px by 1px.

    Many thanks

    Plugin Author Benbodhi

    (@benbodhi)

    It might be worth trying to regenerate your media library using the WP-CLI.

    None of my test sites had this issue, so it’s hard for me to troubleshoot from here unfortunately.

    I remember in the past I have used CSS like this:

    img[src$='.svg'], svg {
        width: 100%;
    }
    

    That way it makes sure that any image using SVG as source or any that have been swapped out for inline SVG will all fill the width of their container, which is usually the expected behaviour in my experience.

    But I’d love to know what’s going on in your case! Wish I could reproduce it somehow. I’ll have a really good dig through everything and see if I can see why this would happen.

    Thread Starter lianpb

    (@lianpb)

    WCBRS 2019 Contributor

    Hello @benbodhi

    Is there a way I can send you a Dev URL that isn’t displayed on this forum?

    Many thanks

    I can confirm that this issue affects SVGs that have already been uploaded. If you re-upload the same SVG, the SVG works, but we have many sites that have many assets and re-uploaded or regenerating thumbnails isn’t realistic for us. There are cases where setting CSS so SVG to 100% also doesn’t make sense for us, so that isn’t an option either. I’ll have to revert back to an older version until this is fixed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘SVGs appearing at 1px since update to 2.4’ is closed to new replies.