[Resolved] SVG causes error in Image Widget, but not in HTML Widget

Home Forums Support [Resolved] SVG causes error in Image Widget, but not in HTML Widget

Home Forums Support SVG causes error in Image Widget, but not in HTML Widget

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #611636
    badcat

    When trying to use a previously uploaded SVG via the default WordPress Image widget I get the following errors.

    Warning: Illegal string offset 'width' in ../wp-includes/media.php on line 988
    Warning: Illegal string offset 'height' in ../wp-includes/media.php on line 989

    If I simply link to the same SVG via the default WordPress HTML widget using an < img src=”myfile.svg” / > then I don’t get an error.

    thanks

    #611653
    Leo
    Staff
    Customer Support

    Hi there,

    Did you set the width and height with CSS?

    I believe it is required when you use SVG file.

    #613796
    badcat

    Yes – that seems to solve it. thank you

    #613873
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.