How to Optimize and Export SVGs | Adobe Illustrator

SVG When you begin working with SVG, it is important to understand how to create, export, and optimize your SVG files for the browsers that will render them.

However, before we start, you need to understand one thing clearly. The optimization of an SVG file begins with its creation and continues all the way to export. Like any HTML web page, it’s difficult to fix a poorly built SVG file after it’s completed.

Sure, you can use optimization tools after export, but this automated approach can break your file in all kinds of unexpected ways. Having a solid working knowledge of good manual SVG optimization concepts will hold you in good stead from the start.

This is exactly what you will learn today.

Note: For those of you using older version of Illustrator here is an appropriate tutorial.

When your graphic is ready for production, select File > Export > Export As… command, then select SVG as option for the file type and hit Export button. You should see the following panel:

Export dialog

Let’s explore the options presented in more detail.


There are three way to style your SVG and they are presented in the first dropdown list.

  1. The first is to use internal CSS (i.e. a <style> block), which is generally considered the best option following the Separation of Concerns principle.
  2. The second method is to use inline CSS styles (i.e. ).
  3. And the third method is to use SVG presentation attributes .

In the image below, you can see the difference between these three options.

enter image description here


If you want to convert your text to outlines, here you can instruct Illustrator to do so. If you want to preserve your text editability, then select SVG option. Outlined text gives you complete visual control of your typography, but at a significant cost – file sizes blow out and text loses editability and searchability.

Note: SVG fonts will be removed from SVG 2 and is considered as a deprecated feature with support being removed from browsers.


Here you can choose how you treat any raster images in your SVG. You can choose to keep them as external files, or to embed them into the SVG as DataURIs. Often Link is a useful choice as it makes the parent SVG file dramatically smaller and, as such, far more manageable in your code editor.

However, the Embed option does have one great, overriding advantage: embedded images can never become unlinked/separated from their ‘parent SVG’. SVGs using linked resources will show the missing image icon the first time the SVG is downloaded, uploaded or moved without its ‘child images’.

Keep this in mind if you require portability in your SVG.

As a general rule, you’ll avoid many future headaches if you can simply avoid using pixel-based graphics in your SVGs whenever you can.

enter image description here

Object IDs

Generally the best option is to select Layer Names, because this will give you meaningful names for your individual SVG elements. Minimal uses random letter-numbers, and Unique uses large random combination of characters.

Object IDs


This option defines how many decimal places your coordinates will have filled after the decimal point. Higher numbers means more precise paths, while lowest number produces less verbose code and small file size.

As you can see from the graphic below, the path with 5 decimal places if far larger than the same path with 1 decimal – yet visually identical.

Keep in mind that we’re talking about 100ths and 1000ths of a pixel here. Higher values will only ever be necessary only if your graphic is very small or requires incredible precision. In most cases, sticking to value of 1 decimal place – will be the best option.

Decimal Places


Check this option only if you’re exporting a final version of your graphic for production and you are sure that the file won’t be edited anymore.


In theory, this option removes the width and height attributes from your SVG document – making it more responsive. However, in most cases, this is not enough to make your SVG truly responsive for all browsers and especially for IE. We’ll explore a fix for this problem in a follow up tutorial.

TIP: It’s always a good idea to keep your original .ai file as your source, and then to export SVG copies with different settings from that parent file.

When you choose Export As… command, in the appearing export dialog you may have noticed an additional option called Use Artboards. It becomes useful when you use multiple artboards—for example, when you create a set of icons—and you want each artboard to be exported as a separate SVG file.

Use artboards

As you’ve seen above, a lot of optimization takes place during the creation and export of your SVG. However, you may want to further optimize your file with some specialized tool, such as SVGO or its web GUI-fied version SVGOMG.

SVGO Optimizer

Be aware that you do need to be careful when using these tools. They can easily break your document functionality. My advice is to use manual optimization whenever it’s possible and use automated optimization tool only if it’s necessary and with caution.


I don’t think I’m going out on a limb to pronounce SVG as the future of web vector graphics. It’s hard to see a situation where SVG doesn’t continue to gain more power along the time. If you haven’t dived in yet, it will be good and wise investment to start learn it now.

We have SVG 2 appearing on the horizon with lots of powerful, new features to play with will. Exciting times ahead.

Related Articles

18 Thoughts to “How to Optimize and Export SVGs | Adobe Illustrator”

  1. yeezy boost 350

    My husband and i felt absolutely glad that Chris managed to round up his web research from the precious recommendations he grabbed when using the web page. It is now and again perplexing to just possibly be offering techniques which often others could have been making money from. And we all understand we have the blog owner to appreciate for this. The explanations you made, the straightforward blog menu, the relationships you make it possible to foster – it is many excellent, and it’s helping our son in addition to the family believe that this matter is brilliant, and that’s very mandatory. Thanks for all the pieces!

  2. yeezy boost 350 v2

    I wanted to make a quick note in order to say thanks to you for these unique strategies you are giving on this site. My extended internet investigation has finally been rewarded with wonderful strategies to write about with my partners. I ‘d declare that we website visitors are unequivocally lucky to dwell in a superb community with so many lovely individuals with insightful points. I feel extremely privileged to have seen your webpage and look forward to so many more entertaining times reading here. Thanks a lot once again for all the details.

  3. kobe 9

    I intended to create you the tiny note to be able to thank you so much again relating to the amazing concepts you’ve shown on this site. This has been quite strangely generous with people like you to present openly exactly what some people would’ve offered for sale for an electronic book to end up making some profit on their own, chiefly seeing that you could possibly have tried it if you ever decided. Those pointers in addition worked as a great way to fully grasp some people have similar eagerness similar to my personal own to figure out a good deal more on the topic of this issue. I am certain there are several more pleasant moments up front for people who find out your website.

  4. off white hoodie

    I just wanted to write a small remark to be able to express gratitude to you for some of the precious tips and hints you are writing at this site. My time intensive internet research has at the end of the day been honored with sensible details to talk about with my visitors. I ‘d mention that many of us readers are extremely endowed to exist in a wonderful website with so many awesome individuals with insightful strategies. I feel very lucky to have used the web pages and look forward to plenty of more exciting times reading here. Thanks a lot once again for a lot of things.

  5. moncler jackets

    I definitely wanted to post a simple word to appreciate you for all the unique guides you are posting here. My long internet investigation has at the end been rewarded with reliable details to write about with my great friends. I would declare that many of us site visitors actually are extremely endowed to exist in a fine site with very many awesome people with insightful concepts. I feel quite blessed to have encountered your entire web pages and look forward to really more entertaining minutes reading here. Thanks a lot once again for a lot of things.

  6. air max 2017

    I’m also commenting to let you know what a extraordinary experience my girl encountered viewing yuor web blog. She discovered a wide variety of details, which included how it is like to have an incredible teaching mood to make the rest effortlessly understand some complex subject areas. You actually surpassed visitors’ expectations. I appreciate you for churning out such good, trusted, informative as well as unique guidance on this topic to Emily.

  7. yeezy

    My wife and i were quite thrilled that Chris could conclude his studies via the ideas he acquired out of the blog. It’s not at all simplistic to just happen to be releasing information which others could have been selling. And we also recognize we have the writer to be grateful to for this. All the illustrations you made, the straightforward site menu, the relationships your site assist to instill – it is mostly overwhelming, and it’s really leading our son in addition to our family reason why that matter is interesting, and that’s exceptionally serious. Thanks for the whole lot!

  8. nmd uk

    Thanks so much for providing individuals with remarkably pleasant opportunity to read in detail from this blog. It is usually so great and jam-packed with fun for me and my office mates to visit your blog at the least 3 times in one week to study the latest tips you have got. And lastly, I’m just always satisfied concerning the striking tips and hints you give. Selected two facts in this post are particularly the very best I have had.

  9. nike air force 1

    I wish to show some thanks to this writer just for bailing me out of such a issue. Just after looking out throughout the search engines and finding thoughts which are not helpful, I figured my entire life was gone. Existing without the presence of answers to the problems you’ve resolved by way of the write-up is a serious case, as well as those that could have badly damaged my entire career if I had not discovered your web blog. Your own competence and kindness in controlling a lot of stuff was invaluable. I am not sure what I would’ve done if I hadn’t discovered such a subject like this. I am able to at this time look forward to my future. Thanks so much for the specialized and effective help. I will not be reluctant to suggest your web site to anybody who wants and needs direction on this situation.

  10. adidas superstars

    Thanks a lot for giving everyone remarkably memorable chance to read in detail from this blog. It really is very enjoyable plus full of a great time for me personally and my office mates to visit your site not less than thrice a week to study the fresh issues you have. And of course, I am usually impressed for the astounding strategies you serve. Some 4 areas in this posting are clearly the most suitable I have ever had.

  11. yeezy boost 350

    Thank you for every one of your labor on this blog. Debby take interest in carrying out research and it’s really obvious why. A lot of people learn all about the lively mode you provide efficient information by means of your blog and in addition cause participation from visitors about this area plus our daughter is without a doubt being taught a whole lot. Take advantage of the rest of the new year. You are always doing a brilliant job.

  12. moncler

    I wanted to send you that tiny remark to finally give thanks again on your pleasing views you’ve contributed at this time. It has been so shockingly open-handed of you to make easily exactly what a lot of folks might have distributed for an ebook to help make some profit for their own end, especially considering the fact that you might well have done it if you ever desired. These tips in addition acted like the great way to be aware that many people have the same desire like mine to understand a great deal more in respect of this condition. I’m sure there are some more enjoyable situations in the future for folks who check out your blog post.

  13. cheap nfl jerseys china

    I enjoy you because of all of your labor on this web page. Betty really likes doing internet research and it is easy to see why. Most people hear all of the powerful means you make worthwhile guides through your website and as well inspire response from other individuals on this content and our own girl is in fact understanding a lot. Enjoy the remaining portion of the year. You’re performing a fabulous job.

  14. adidas superstar

    I wish to show my appreciation to the writer for bailing me out of such a matter. Because of researching throughout the search engines and finding principles which are not productive, I figured my life was over. Existing devoid of the strategies to the issues you have resolved as a result of your guideline is a critical case, and those that might have adversely damaged my entire career if I hadn’t encountered your web blog. Your own personal mastery and kindness in maneuvering every part was helpful. I’m not sure what I would have done if I hadn’t come across such a thing like this. I am able to now look ahead to my future. Thanks so much for this specialized and sensible guide. I will not be reluctant to recommend the sites to any individual who needs to have direction on this problem.

  15. golden goose outlet

    I wanted to send a brief word to appreciate you for the superb suggestions you are giving on this site. My time consuming internet look up has at the end of the day been compensated with reasonable facts and strategies to exchange with my visitors. I ‘d suppose that many of us visitors are definitely lucky to dwell in a wonderful website with many perfect people with valuable basics. I feel extremely privileged to have come across your web pages and look forward to really more fabulous times reading here. Thank you again for everything.

  16. yeezy boost 350 v2

    I precisely had to thank you so much once more. I am not sure the things that I could possibly have taken care of in the absence of the actual opinions discussed by you over this problem. This has been the challenging scenario for me personally, but noticing this specialized way you resolved that took me to cry with delight. I am just grateful for the support and thus trust you really know what a powerful job you are always putting in instructing the mediocre ones with the aid of your web site. I am certain you’ve never met all of us.

  17. michael kors outlet

    I’m just writing to let you know of the fantastic experience my daughter obtained browsing your webblog. She even learned a wide variety of details, most notably what it’s like to possess an ideal giving spirit to let other folks without hassle master various extremely tough topics. You actually exceeded our expectations. Thanks for rendering these necessary, safe, educational not to mention easy tips about that topic to Janet.

  18. yeezy boost 350 v2

    I together with my buddies happened to be following the nice hints on your site while immediately got a terrible suspicion I had not expressed respect to you for those tips. My young boys became as a consequence happy to learn them and already have really been tapping into these things. Many thanks for getting quite kind and also for using varieties of wonderful ideas most people are really desperate to be informed on. Our own sincere regret for not expressing gratitude to you sooner.

Leave a Comment