• Resolved Anonymous User

    (@anonymized-13630879)


    I’ve tried uploading svg files to media and so far its working. When i go to a brand page in admin and select one of those svg files it works and i can see it on the admin page. But after saving it doesn’t seem to store/output the logo on admin page.

    Is this a bug or does not PWB support SVG logos? Could that be solved in some way?

    Functions.php

    add_filter(
      'upload_mimes',
      function( $mimes ) {
        $mimes['svg'] = 'image/svg+xml';
    
        return $mimes;
      }
    );

    System status

    Array
    (
        [home_url] => https://domain.tld/
        [site_url] => https://domain.tld/
        [version] => 3.5.2
        [wp_version] => 5.0
        [wp_multisite] => 
        [wp_memory_limit] => 40M
        [wp_debug_mode] => 1
        [wp_cron] => 1
        [language] => en_US
        [server_info] => Apache
        [php_version] => 7.1.24
        [php_post_max_size] => 50M
        [php_max_execution_time] => 90
        [php_max_input_vars] => 3000
        [max_upload_size] => 52428800
        [default_timezone] => UTC
        [theme] => Array
            (
                [name] => Project X
                [version] => 1.0.0
                [parent_theme] => 
            )
    
        [active_plugins] => Array
            (
                [0] => advanced-custom-fields-pro/acf.php
                [1] => advanced-custom-fields-table-field/acf-table.php
                [2] => classic-editor/classic-editor.php
                [3] => formidable-pro/formidable-pro.php
                [4] => formidable/formidable.php
                [5] => loco-translate/loco.php
                [6] => perfect-woocommerce-brands/main.php
                [7] => redirection/redirection.php
                [8] => timber-library/timber.php
                [9] => woocommerce/woocommerce.php
                [10] => wordpress-seo/wp-seo.php
            )
    
        [pwb_options] => Array
            (
                [version] => 1.7.0
                [wc_pwb_admin_tab_brand_single_position] => before_title
                [old_wc_pwb_admin_tab_slug] => brands
                [wc_pwb_notice_plugin_review] => 
                [wc_pwb_admin_tab_slug] => brands
                [wc_pwb_admin_tab_brand_desc] => yes
                [wc_pwb_admin_tab_brand_single_product_tab] => no
                [wc_pwb_admin_tab_brands_in_loop] => no
                [wc_pwb_admin_tab_brands_in_single] => no
                [wc_pwb_admin_tab_brand_logo_size] => thumbnail
            )
    
    )
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor titodevera

    (@titodevera)

    Hi Mr. T.

    I can′t reproduce your issue ?Can you give us some more details? ?Can you provide us your site link?

    IMPORTANT: WordPress do not allow SVG upload by default for security reasons. SVG images are not images as it, they area xml files and can expose your site a multiple security vulnerabilities. I think you should take care about this.

    ??

    Thread Starter Anonymous User

    (@anonymized-13630879)

    Hi Tito,

    I see. I found the problem (it was the image not having any size).

    Here’s the solution (maybe this could be added in an upcoming version of PWB?):

    styles-admin.css

    .taxonomy-pwb-brand .pwb_brand_image_selected span img {
      width: auto;
      height: auto;
      max-width: 90px;
      max-height: 90px;
      vertical-align: middle;
    }
    .taxonomy-pwb-brand table.wp-list-table .column-logo img {
      width: auto;
      height: auto;
      max-width: 60px;
      max-height: 60px;
    }
    • This reply was modified 5 years, 11 months ago by Anonymous User.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘SVG brand logo’ is closed to new replies.