{"id":364090,"date":"2022-03-18T15:31:22","date_gmt":"2022-03-18T22:31:22","guid":{"rendered":"https:\/\/css-tricks.com\/?p=364090"},"modified":"2022-03-18T15:31:24","modified_gmt":"2022-03-18T22:31:24","slug":"optimizing-svg-patterns","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/optimizing-svg-patterns\/","title":{"rendered":"Optimizing SVG Patterns to Their Smallest Size"},"content":{"rendered":"\n

I recently created a brick wall pattern as part of my #PetitePatterns<\/a> series, a challenge where I create organic-looking patterns or textures in SVG within 560 bytes (or approximately the size of two tweets). To fit this constraint, I have gone through a journey that has taught me some radical ways of optimizing SVG patterns so that they contain as little code as possible without affecting the overall image quality.<\/p>\n\n\n\n

I want to walk you through the process and show you how we can take an SVG pattern that starts at 197 bytes all the way down to a mere 44 bytes \u2014 a whopping 77.7% reduction!<\/p>\n\n\n\n

<\/p>\n\n\n\n\n\n\n

The SVG pattern<\/h3>\n\n\n