Site logo

Archived topic

SVG causes error in Image Widget, but not in HTML Widget

3 replies · Started by badcat on June 29, 2018

Viewing posts 1–4 of 4

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

Hi there,

Did you set the width and height with CSS?

I believe it is required when you use SVG file.

Yes - that seems to solve it. thank you

No problem :)

This archived topic is closed to new replies.