Archived topic
404 error for some svg images
13 replies · Started by roadlink on February 17, 2021
Hello,
I run lighthouse test from browser and getting error for 2 svg images.
I couldn't find where to change them.
I guess they are related with logo somehow.
<img src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E
<img src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know :)
sure
These are the two places that the logos are being uploaded from:
https://docs.generatepress.com/article/adding-header-logo/
https://docs.generatepress.com/article/mobile-header/
Hi Leo,
Thanks for reply.
I know that but I already uploaded logos as below.
And I didn't upload any SVG's.
Couldn't solve the issue :(
Hi there,
I've checked your site and I don't see the error mentioned.
And it doesn't seem to be using SVG for logo at all as shown here: https://share.getcloudapp.com/P8ukGqzG
Perhaps you weren't able to upload .svg files yet? Let us know.
Hello Elvin,
I open my site.
Press F12.
Lighthouse
Generate report.
Then I see the error.
I have added screenshot.
Thanks for your time.
Are you using any plugins to allow upload of SVG? Can you mention what it is?
Did you also filter the logo output?
It's quite strange how your logo DOM is structured.
The default way the theme structures the logo looks like this: https://share.getcloudapp.com/OAugG24W
But your site is structuring the logo this way https://share.getcloudapp.com/P8ukGqzG
which adds in an extra <picture> tag.
Can you disable all plugins except GP Premium to check what's causing this? Let us know.
Dear Elvin,
Indeed yes, I have this plugin. https://wordpress.org/plugins/safe-svg/
But I have disabled it, clear the cache, clear the autoptimize cache, clear the cloudflare cache.
Still having same problem.
I am giving login info in below.
Safe SVG doesn't change the HTML structure like this. https://share.getcloudapp.com/P8ukGqzG All that plugin does is it allows for SVG file upload on WordPress.
But I have disabled it, clear the cache, clear the autoptimize cache, clear the cloudflare cache.
You may have to try disabling ALL the plugins except GP Premium and check which one is inserting the extra element.
It is dev site, so don't be afraid to change anything. You can play as much as you like.
It's against our support policy to do any changes to the user's site.
Hello,
As you said I tried to activate all plugins 1 by 1.
And perfmatters created the issue.
I will contact with them. Sorry to take you time.
Btw, I see that I have warning for sticky logo and mobile logo size. SS added.
"Image elements do not have explicit width and height"
Thank you
You may have to filter the mobile header's logo to add in the width and height attribute to your image.
See David's answer here:
https://generatepress.com/forums/topic/how-to-set-height-and-width-for-the-logo-image/#post-1563234
Note: I'm not exactly sure if perfmatters would conflict with this but this is generally how you do it.
thank you :)
No problem. :D