[openstreetmap/openstreetmap-website] Routing sprites to SVG (PR #4794)
Hidde Wieringa
notifications at github.com
Tue May 14 19:16:51 UTC 2024
> Is there a good reason to minimize the source when we run them all through svgo before serving them in production?
2 main reasons for me:
- For example https://www.openstreetmap.org/assets/sprite-e144d5cba10d95411535e0f63a538f760b299585fa9726c2ba8a37e3a6164300.svg and https://www.openstreetmap.org/assets/osm_logo-4afddaae0230a5a46687fdc751ed256dfdccde144118cb02a7d7960f207a4b92.svg (2 SVGs fetched from the frontpage): they contain unneeded attributes, whitespace and even some personal information like filenames. Minimizing them with a tool, and then by hand, makes the files smaller than can be achieved automatically. Maybe the tool can be configured better to remove unneeded attributes, but this also works.
- Reviewing changes is easier when the SVG content is much smaller. Although I must admit that having newlines instead of a single huge long line is easier to read. I might add in newlines again in all these SVGs.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4794#issuecomment-2110974902
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4794/c2110974902 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240514/e9f9ecfe/attachment-0001.htm>
More information about the rails-dev
mailing list