whoami

Lucas Jenß

cat /etc/motd

The Coding Journal ツ — Notes taken on an epic coding journey. Technical solutions, debugging notes, and practical guides from the trenches of software development.

Close-up of white dominoes with black dots standing on green felt surface, shallow depth of field, focused mood

ls -la ~/languages/

total 8
drwxr-xr-x
▶ PHP
▶ Ruby
▶ Scala
▶ C#
▶ JavaScript
▶ Objective-C
▶ Shell Scripting

ls -la ~/toolchain/

total 7
drwxr-xr-x
▶ Typo3
▶ Akka
▶ Capistrano
▶ Git
▶ MAMP
▶ Adobe Illustrator
▶ NSTrackingArea (Cocoa)

uname -a

platforms
drwxr-xr-x
▶ Mac OS X
▶ Unix

Optimizing SVG Paths for Smaller File Sizes in Illustrator

SVG is a practical format for logos, icons and interface graphics because it stays sharp across phones, monitors and large displays. The source file can still become surprisingly heavy, though, especially when artwork contains traced photographs, repeated points, hidden layers or thousands of tiny curves. Optimizing SVG paths for smaller file sizes in Illustrator is largely a matter of removing unnecessary geometry while preserving the shapes that carry visual meaning.

A lean SVG loads faster, is easier to maintain and creates less work for a browser to render. This matters to an Australian ecommerce site serving customers on mobile connections in regional areas, as well as to a design studio in Sydney or Melbourne delivering a large set of icons to a developer. The process is safest when you measure file size and inspect the rendered result after every significant change.

Why Path Size Matters

An SVG is XML containing paths, attributes, groups and styling information. A path built from many anchor points needs more coordinate data, so a detailed illustration can become several times larger than a carefully constructed equivalent. Excessive nodes can also make browser rendering slower and make future editing in Illustrator unpleasant.

The impact is easy to miss on a fast office connection in Brisbane. A customer using a phone on a congested regional network, however, benefits from every unnecessary coordinate removed. Small assets also improve page caching and reduce the amount of data transferred when a logo appears on every page of an online shop.

File size is not the only concern. A path with excessive points can produce jagged curves, unexpected joins and awkward scaling. Designers who regularly examine vector workflows, such as those documented in Mike Patt’s notes, will recognise that a clean source usually provides a more dependable result than a file that has simply been compressed at the end.

Audit Artwork Before Simplifying

Start by opening the Layers panel and identifying objects that are not needed in the exported graphic. Delete hidden objects, unused clipping masks, stray points and duplicate shapes. Expand the appearance only when the effect genuinely needs to become part of the final SVG. Keeping live text, brushes or effects that the browser cannot interpret reliably may lead to larger or less predictable output.

Select a path and use Illustrator’s Object > Path > Simplify command. The preview is useful because it shows how the anchor count changes as the curve precision is adjusted. Work gradually rather than moving the curve slider immediately to an extreme setting. A logo may tolerate a modest reduction, while a hand-drawn illustration may need a much higher curve accuracy.

Zoom out to the size at which the asset will actually appear. A small icon displayed at 24 pixels does not need the same detail as a hero illustration shown across a desktop landing page. Inspect the artwork at 100 percent as well, since a simplified curve can look acceptable from a distance but reveal a flat section or a dent along its edge when enlarged.

Illustrator Settings That Influence Output

When using Save As or Export for Screens, choose SVG and review the advanced options. Decimal precision controls how many digits Illustrator writes for coordinates. A value around three to five decimals is often a useful starting point for interface graphics, although intricate artwork may need more. Lower values usually reduce the file size, while higher values preserve fine positioning.

The styling choice also affects the markup. Presentation attributes can create compact, readable SVG output, while inline styles may be preferable when an asset needs predictable appearance across different tools. Decide whether Illustrator should retain responsive dimensions, include a background, or preserve editing data. Illustrator-specific metadata and unnecessary namespaces increase the file without improving the browser display.

Avoid converting every stroke to an outline by habit. Outlining a simple stroke can create a larger compound path, although it may be necessary when the exact stroke width, cap or join must survive outside Illustrator. Similarly, use a single fill where possible instead of several overlapping shapes that occupy the same visual area.

Comparing Ways To Reduce SVG Weight

Different techniques remove different kinds of excess. Simplifying an existing path is quick, while rebuilding a shape can provide the best result when the source was created through automatic image tracing. A post-export optimiser can remove XML whitespace and redundant attributes, but it cannot always repair poor geometry.

Method Best Use Main Benefit Risk
Simplify Path Logos and smooth illustrations Reduces anchor points quickly Curves may lose character
Manual Redrawing Icons and geometric marks Produces clean, intentional geometry Takes more design time
Image Trace Cleanup Complex raster conversions Removes tracing noise Can leave many small paths
SVG Export Settings Every Illustrator asset Controls precision and metadata Excessive reduction may distort details
SVGO or Similar Optimiser Final production files Removes markup and redundant data Needs visual and functional testing

A sensible workflow combines these methods rather than relying on a single command. First remove unnecessary objects, then simplify or redraw the geometry, and finally optimise the exported markup. Keep an untouched Illustrator source so that later revisions do not require editing a heavily compressed production file.

Compare the original and reduced files by kilobytes, path count and visual appearance. For a small icon set, a difference of a few kilobytes per file can add up across a shopping catalogue. For a detailed illustration, visual fidelity may be worth retaining a larger file, especially when it appears only once on a page.

Preserving Shape And Rendering Quality

Pay close attention to corners, narrow gaps and negative space. Simplification algorithms often remove points that appear redundant mathematically but are important to the design. This is particularly noticeable in letterforms, Aboriginal-inspired patterns, map outlines and logos with distinctive bends. Work on a duplicate and use Outline mode to understand which anchors are shaping the silhouette.

Compound paths require extra care. A hole in a letter or icon can disappear if the fill rule changes, and overlapping objects can produce a different result after export. Test the SVG in the browsers used by the project, including current Chrome, Safari and Firefox versions. Safari testing is particularly relevant for Australian audiences using iPhones and iPads.

Check strokes at multiple sizes and backgrounds. A thin line that looks balanced against a white artboard may become too faint on a dark website theme. If the graphic forms part of an accessible interface, provide meaningful alternative text in the HTML and avoid relying on colour alone to communicate information.

A Repeatable Workflow For Local Projects

Create an export copy of the Illustrator file and name it with a useful version marker, such as brand-mark-v3. Clean the layers, remove unused objects and decide whether text should remain live or be converted to outlines. Outlined text prevents font substitution, but it adds geometry and can make the asset harder to edit. For a fixed logo, that trade-off is often reasonable.

Run a first export with moderate decimal precision and inspect the source in a text editor or browser developer tools. Look for excessive <path> data, unnecessary groups and embedded raster images. If the file contains a raster image, it is no longer a genuinely lightweight vector asset; link or compress that image separately where the design permits.

Teams in Melbourne or Perth may hand SVGs between designers, developers and marketing contractors, so document the export settings alongside the asset. A short note stating the Illustrator version, decimal precision and whether strokes were outlined prevents inconsistent re-exports. The same discipline is useful when a mobile developer consumes the graphic inside an application; the principles are similar to the native integration described in this Android NDK example.

Practical Checks Before Publishing

A small checklist catches most problems before an optimised SVG reaches production. Keep the original artwork available, because aggressive cleanup is difficult to reverse. Review the asset in the actual page or application rather than judging it only on Illustrator’s artboard.

  • Remove hidden, duplicate and off-artboard objects before export.
  • Use Simplify Path carefully and inspect important curves at 100 percent.
  • Set decimal precision according to the asset’s visual complexity.
  • Test fills, compound paths, strokes and responsive scaling in several browsers.
  • Compare file size and rendering quality after every optimisation pass.

Automate the final validation when the project contains many icons. A build process can run an SVG optimiser, report unusually large files and reject accidental raster embeds. Keep an eye on accessibility as well: a smaller path does not make a decorative image meaningful, and an efficient logo still needs suitable labelling when it conveys information.

Choosing The Right Level Of Compression

There is no universal target size for every SVG. A simple monochrome icon should be extremely small, while a detailed map or illustration may legitimately contain more coordinates. Set budgets by asset category instead of forcing every file through the same precision setting. For example, a navigation icon, a company logo and a campaign illustration each deserve a different tolerance for geometric change.

For Australian websites, test from the conditions customers actually experience rather than relying solely on a high-speed studio connection. Check a mobile viewport, a Retina display and a slower connection profile. Review how the artwork behaves in a local council website, a national retailer or a community organisation’s content system if those reflect the intended audience.

The best production SVG is the smallest version that preserves the intended shape, colour and behaviour. Make one controlled change at a time, retain the editable source, and record the settings that produced the approved file. Apply that workflow to the next Illustrator asset, measure the result in the browser, and publish the lighter graphic with confidence.


cat ~/interests.json

KeyValue
editorTerminal-first workflow
osMac OS X / Unix
vcsGit, distributed version control
deployCapistrano, cron automation
graphicsSVG, Adobe Illustrator troubleshooting
networkingIP validation, SSH, VPN

git log --oneline --reverse

2013-10-30

Solving SVG import issues in Adobe Illustrator CS6 and CC

When importing an SVG into Illustrator, the operation fails with an unknown error [CANT]. A workaround for this Adobe-side bug.

2013

Solving NDK build issues on OS X

Troubleshooting native development kit compilation problems on Mac OS X.

2013

Programmatically adding PHP generated TypoScript to the backend configuration

Integrating dynamically generated TypoScript into Typo3 backend setups using PHP.

2013

ArgumentError: Could not parse PKey: no start line

Debugging an SSH key parsing error encountered during deployment.

2011-08-04

Validating IP-Addresses in PHP

Using PHP filter functions with flags like FILTER_FLAG_IPV4 and FILTER_FLAG_IPV6, and understanding how filter_var handles reserved IP addresses.

2011-07-09

Cocoa: Using NSTrackingArea

A short tutorial on using Cocoa's NSTrackingArea to capture mouseEntered and mouseExited events.


cat ~/contact.txt

github: github.com/x3ro
stackoverflow: x3ro
coderwall: coderwall.com/x3ro
twitter: @x3rames