-
AuthorPosts
-
September 21, 2021 at 11:39 am #1321734
Hi, could you please make “upload SVG logo” as an option including resizing?
September 21, 2021 at 11:52 am #1321736i hope that WordPress will include the svg support soon.
But you can activate the svg mime type by adding this to your child-theme functions.php:function custom_mtypes( $m ){ $m['svg'] = 'image/svg+xml'; $m['svgz'] = 'image/svg+xml'; return $m; } add_filter( 'upload_mimes', 'custom_mtypes' );
or use that wonderful plugin svg support – it also enables previewing in the media library.
September 21, 2021 at 12:03 pm #1321737Dear Guenni007,
Thank you for your response. I am using this plugin. However, the issue is that Enfold does not display the logo when I upload SVG. The rest of the images of course do.
Michael
September 21, 2021 at 1:07 pm #1321754svgs do have on default for WordPress a width and height of zero “0”
Therefore, one must then assign a width to the logo. This can be a very large value and must be an absolute unit for some browsers (so % and em etc. does not work). The adjustment of the size of the logo is done via the display property of the surrounding container.
If you don’t use the option in svg support to force replacement of all svg to inline svg try:
#top .logo img { width: 450px }
if you have the inline svg :
#top .logo svg { width: 450px }
as inline svg and shrinking header there are ways to implement the svg support too.
may i see your site?September 21, 2021 at 1:16 pm #1321755By the way dear developer team – it would be very nice if you would also add the selector for inline svg logos in avia-snippet-sticky-header.js.
the shrinking option then of inline svg logos will work properly:var logo = $('#header_main .container .logo img, #header_main .container .logo a, #header_main .container .logo svg '),
September 21, 2021 at 2:04 pm #1321763Hi @guenni007,
Thanks for your suggestion! @Guenter has updated the selector and it will be included in upcoming version of Enfold :)
Cheers!
YigitSeptember 21, 2021 at 2:35 pm #1321776see here a snippet to replace every img tag with svg link with its inline svg:
https://kriesi.at/support/topic/replace-logo-image-with-inline-svg-code/#post-1307101the trick with the logo replacement is that the attribute of preserveAspectRatio is set in dependency where the logo is placed ( left, center, right )
PS: for some svgs the xmlns xmlns:xlink is an important setting – in this case get rid of that line:
svg = svg.removeAttr('xmlns xmlns:xlink');
September 27, 2021 at 9:13 am #1322434Site link
September 30, 2021 at 5:17 pm #1323059Hi,
Support for svg logos will be part of the next release 4.8.6.4.
Do you want to wait for it or do you want to have a pre release including it ?
Best regards,
GünterOctober 4, 2021 at 11:19 am #1323418Wauw thats amazing! i have to update some sites. So i’ll wait for the release… when would this be?
October 4, 2021 at 11:35 am #1323423 -
AuthorPosts
- You must be logged in to reply to this topic.