Insert a svg image to another svg image

Hi friends, Today we are going to discuss most common issue that are faced by most of the web developers i.e how we can insert another svg image to another svg image. Therefore, We will modify one svg image in easy way. Let’s start without any delay.

Insert a svg image to another svg image
  • First of all , we need two svg image. Therefore I request you to visit icons8.com and type “google” in search box. You can open this direct link in your browser.
  • Then click any google icon and click on download button.
  • A popup will be appeared in which you will have to choose svg embed code and then copy the code and paste into your text editor and save it.
  • Now, again go to icons8.com website and search another svg image and save the SVG embed code in your text editor and save it.
  • Now, Copy the code between svg tag from google.svg file.
  • Create a <g> tag at last of the another svg file before end tag of the svg tag. Then paste your previous copied code from google.svg file and paste into <g> tag. Now save the another file and run it in browser.
  • Both svg images will be appeared. But it might be possible that google.svg image position and size are not accurate. Then you just need to add one attribute i.e transform.
  • In this attribute, transform has two values one is for translate and second is for scale.

Let us see the example.

<g id=”g-icon” transform=”translate(“25,255″) scale(2.25)”></g>

Hope this article will help you while editing any svg file.

Also check outhttp://learnwill.net/share-files-through-google-drive-link/

Scroll to Top