• Resolved johannes999

    (@johannes999)


    hello,

    I have inserted svg function in function.php and I have exported as an example logo text in svg format from photoshop to my computer.

    I uploaded this svg file to my theme but I see only text without background

    I never used svg before is this normal ? I want to be sure if it is not normal then I have to look for the problem somewhere else?

    this code lijn I added in my function.php:

    function add_file_types_to_uploads($file_types){
    $new_filetypes = array();
    $new_filetypes['svg'] = 'image/svg+xml';
    $file_types = array_merge($file_types, $new_filetypes );
    return $file_types;
    }
    add_filter('upload_mimes', 'add_file_types_to_uploads');
    

    I want to use svg with advice of photoshop expert because ping format text logo’s maded with photoshop they are not good. they are all vague.

    I want only to be sure if the svg has no background ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It seems you set the background via CSS. Numerous examples at https://duckduckgo.com/?q=svg+file+background+color&ia=web

    Thread Starter johannes999

    (@johannes999)

    thanks,

    I made the background border and color in photoshop and added some text to test it in wordpress. I have exported it as svg evrything was ok .

    but when I uploaded to wordpress through media section the background is gone .

    I wanted to be sure if it was not from wordpress or from the code I inserted in function.php

    I saw that I have to use some html code for background. thanks for the links.

    Thread Starter johannes999

    (@johannes999)

    I have just an answer from photoshop community that the photshop has its limits and it is beter for this purpose to use Illustrator.

    which I wil not do .

    thanks I wil study tomorrow your links

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘does svg file format can have background color?just yes or no!’ is closed to new replies.