Usage of SVG formatted image not liked by class_upfront_output.php file

I installed the SVG Support V2.2.2 plugin by BenBodhi, uploaded a SVG file and added it as featured image to one of my blogs. As a result I received some error messages (see attached). The plugin supports CSS formatting. Is upfront compatible to SVG files? Can you recommend specific settings I should use to format the file properly so it works with upfront?

  • Milan

    Hello @zitzmre_wpmu,

    If I am not wrong we are talking about SVG Support plugin right ?

    If its the plugin you are talking about then I was able to replicate these error messages with piano theme. I've crated bug report for this and notified our developer about this.

    Furthermore I've noticed that these error messages are not affecting Upfront any way, even with these error message I was able to edit and make some tweaks with upfront, so for now you can hide those message by disabling debug mode from your wp-config.php file.

    Just open your wp-config.php file, search for "WP_DEBUG" Constance and set its value to "false".

    Thanks for being with us.

    Please let us know if there is anything else in which we can help you with. :slight_smile:


  • Adam Czajczyk

    Hello Reinhard!

    The issue here is that the lines indicated by warnings is a code that calculates sizes. Since SVG is a vector format and it doesn't work the same way as "bitmap" images such as JPEG or PNG it cannot be easily calculated that way without additional hacks.

    I understand that the plugin that you're using is adding some support for SVG to WordPress but it's not able to make SVG 100% "compatbile" with "regular"/"bitmap-based" images. Therefore those calculations doesn't work properly here. The "division by zero" occurs because "SVG" virtually doesn't have a "size".

    That said, I think we'd need developers help here so as Milan already reported it to our devs, it'd be up to them now. I'm not able to give you any ETA on this but hopefully they'll put that on priority list as SVG is quite a popular format and I'm pretty sure more members of our community may be interested in using it with upfront.

    As for errors/warnings. These are native PHP warnings. I can also confirm that they do not affect Upfront's work (apart, of course, SVG support) but in order to get rid of them you'll either want to quit on SVG or change PHP's error reporting settings. An example setting for PHP config would be:

    error_reporting(E_ERROR | E_PARSE);

    which will only report errors and syntax issues but suppress warnings.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.