Jump to content

Help with SVG: Inline VS separate file


MikeyZ
 Share

Recommended Posts

I'm trying to work with SVG images for my site, but I'm having server issues so I'm going to try using inline SVG. The problem is, I've never worked with SVG before and I use an app called RealWorld Paint to make SVGs. It exports an SVG file that will render in the browser (but for some reason creates a 404 error on the server... I'm borrowing it so I'm not the one who needs to know how to fix it.)

 

So what I need to do is figure out how to convert a SVG file into a HTML inline chunk. How do I do this?

 

Do you want to see some SVG code I'm working with? Here's one. *attach*

 

...EDIT: The attachment didn't work. Uploading file contents instead.

<?xml version="1.0"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="99px" height="70px"><g><image width="99" height="70" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGMAAABGCAYAAADYWioQAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAJAUlEQVR4nO2cW2wjVxnHf2fG9ozH46wdJ3F2s9vdGoSEuFQUKQ9Yu2VVqSskBEJFXIRAQjyUOw9EFYKHdgGpUCLYJx5AqpBWoOUBVHiggoLEUgIiLX3gVlGqCJrNZjdxLo6v4/HM4cF21puNEzuZGa+9+UWj2HPOnPN5/vOdb+abmSM4AHJmOgqMtS2p5v+8mJ2/fJA2jwCxx44db/s8tuOzvkebF8Xs/JM+2jy0CDkzvQxMetzukSAHQAH+6kO7T8iZ6Sd9aHeo8UsMOBKkZxTgJR/bPxKkB4ScmT4O/BfIN5etDp/3Kz8B/BlI7tLPUQzpAuFlY3Jm+t3A80Bol+IjQfZB8bIxMTv/e+DTHYqPhqx98NQzWsiZ6e8AMx2KffEQK5tRAZWGV6pty37fD7JNr98dYBF4SZtb+Fen3+CXGArwc+D9HaocWhArm7kfeAz4KHBSSm+93C+E4B/A08AVbW7Bvq3Mr07lzLQB/BF4R4cqBxLEymbeBMwC75XSP/v9RgheBR7W5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WKSM+KGuSQZSjK1aBVe6pM2JxqmqVw0fgFvxxCZX2mREj6Md0EODFOPQCR9XSop2FSMUCeweQ7foahg9lqRoV6k59Z5PIITACVKMxcNs7EgXx3U5pkU9edrDL8ywjkRSrtfQ1FAv1zeLQWZtDzWZsSoUImrorhaihUBgNJOM+70G0MaLQb/T93cpeWuQfQ4KQvBo0K+RPR1wfwOBELwGPBu0GFeas1YecTtf1+YW3EDFaM7j+nBzksQjACH4qja3cBn6N13FSeBqc7LEe5amEE+1vvdlDpXmPK7nhOByc7LEewoheE0IPtEuBPRxVp0WVjZzCvgsjVnLHpCS3R/dGGCa0zAtAi8CV4BntbmFOy6C/w/f/17PZ/qAhAAAAABJRU5ErkJggg==" /></g><g><polygon points="1,2 19,1 34,15 30,18 18,6 2,7" fill="#ff7537" /><rect x="27.7257px" y="14.5472px" width="10.6279px" height="6px" transform="translate(33.0396,17.5472) rotate(-40) translate(-33.0396,-17.5472)" fill="#000000" /><path fill-rule="evenodd" fill="#f83a22" d="M 26 31 C 26 25.4771 42.4771 10 48 10 L 89 10 C 94.5229 10 99 14.4771 99 20 L 99 60 C 99 65.5229 94.5229 70 89 70 L 37 70 C 31.4771 70 27 65.5229 27 60 C 27 60 26 31 26 31 z" /><path fill-rule="evenodd" fill="#da2b00" d="M 61 40 L 35 19 L 64 38 L 96 14 L 67 40 L 95 67 L 64 42 L 30 67 C 30 67 61 40 61 40 z" /></g></svg>
Edited by MikeyZ
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...