Skip to content

Conversation

@gudenau
Copy link

@gudenau gudenau commented Aug 23, 2022

No description provided.

@teunjojo
Copy link

@skycatminepokie

This PR has been blocked for 7 months now, because the validate check is stuck. This PR is needed for simple-icons/simple-icons#13332

@skycatminepokie
Copy link
Contributor

@skycatminepokie

This PR has been blocked for 7 months now, because the validate check is stuck. This PR is needed for simple-icons/simple-icons#13332

I'm not a maintainer, so I don't think I can fix that. I'll get a maintainer to check in.

Copy link

@Gamebuster19901 Gamebuster19901 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not a maintainer, but I don’t see the point of this.

What is the point of a .svg if it takes up 20x as much space, and there is otherwise no benefit? The fabric logo 485 bytes, this is 9.89kb.

You don’t even get the scalability benefit from a .svg because the logo can already be scaled as nearest neighbor without looking bad.

Minecraft doesn’t read .svg anywhere.

Additionally if the logo ever changes, this would have to be updated, and most people don’t have a .svg editor.

As far as I can tell, there is nothing simpler about this, as a 16x16 png is basically as simple as it gets.

@haykam821
Copy link
Contributor

I was going to say that SVGs can be optimized by being handwritten as opposed to being generated by a tool, but after taking a look at the SVG, I have only one question: why is there a PNG embedded inside this SVG?

@Gamebuster19901
Copy link

Maybe I’m being paranoid, but I think we should treat this file as potentially suspicious until it’s been thoroughly examined. .svg files can include embedded scripts or payloads, and the size of this file seems unusually large for something based on a 16×16 png.

I’m NOT trying to suggest anything malicious on the author’s part, just that we should be careful with unexplained binary content.

I’m also not a svg format expert, but I’ll take a closer look when I get off work.

@Earthcomputer
Copy link

It's not unexplained binary content, it's a PNG image blob, which can't contain malicious data

@Gamebuster19901
Copy link

I haven’t been able to examine the file yet. I’ve been assuming the png blob is the 16x16 logo, which is only 485 bytes. Is that not the case?

Also, pngs can contain malicious content, but I wasn’t really concerned about the png blob because I’ve been assuming it’s 485 bytes, which would leave most of the other data as unexplained.

@solonovamax
Copy link

solonovamax commented Jul 21, 2025

Maybe I’m being paranoid, but I think we should treat this file as potentially suspicious until it’s been thoroughly examined. .svg files can include embedded scripts or payloads, and the size of this file seems unusually large for something based on a 16×16 png.

I’m NOT trying to suggest anything malicious on the author’s part, just that we should be careful with unexplained binary content.

I’m also not a svg format expert, but I’ll take a closer look when I get off work.

it seems that the <image> was accidentally left in, as it can be entirely removed without affecting anything.

all of the other stuff is metadata that inkscape will add on to any exported files, which can easily be removed with svgo.

if I apply the following modifications:

  • remove the xml:space property on the <svg> tag (idk why svgo doesn't remove it)
  • remove the <image> tag

and then run svgo on the file with the config that I'm using for my website (slightly more aggressive than the normal svgo config & does stuff like removing useless style attributes & removing the <title> tag), then I get the resulting svg (newlines & spacing added for clarity):

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
    <path fill="#38342a" d="M9 1h1v1h1v1h1v1h1v1h1v1h1v2h-1v1h-2v1h-1v1h-1v1H9v2H8v1H6v-1H5v-1H4v-1H3v-1H2V9h1V8h1V7h1V6h1V5h1V4h1V2h1z"/>
    <path fill="#dbd0b4" d="M4 9V8h1V7h1V6h1l1-1V4h1l.515-.487L9 3V2h1v1h1v1h1v1h1v1l-1.36.637L10 10l-1.45.55L8 12l-1.625.704-2.832-3.053Z"/>
    <path fill="#bcb29c" d="M9 3h1v1h1v1h1v1h1v1h-1L9 4zM12 7l-.509-.44L11 7l-1 1v2h1V9h1zM10 10H9l-.443-.595L8 10v2h1v-1h1ZM8 12H7l-.477.546L7 13h1z"/>
    <path fill="#c6bca5" d="M7 5h1v2h3v1H9V6H7ZM6 8h1v2h2V9H6z"/>
    <path fill="#aea694" d="M3 9v1l3 3 .493.427L7 13v-1H6v-1H5v-1H4V9Z"/>
    <path fill="#9a927e" d="M3 10v1h2v2h2v1H6v-2H4v-2z"/>
    <path fill="#807a6d" d="M13 7h1v1h-1z"/>
    <path fill="#aea694" d="M9 4v1h2v2h1V6h-2V4Z"/>
</svg>

as for size:
this is still larger than the png image as it is 778 bytes, but if it's compressed (at max quality), then the size of the file is:

  • gzip: 424 bytes
  • brotli: 391 bytes
  • zstd: 418 bytes

@Earthcomputer
Copy link

FWIW, there is an option in inkscape to export as a plain SVG as opposed to an inkscape SVG

Copy link

@Earthcomputer Earthcomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be made smaller as per previous comments

@solonovamax
Copy link

solonovamax commented Jul 21, 2025

FWIW, there is an option in inkscape to export as a plain SVG as opposed to an inkscape SVG

even if you export as a plain svg, it will still have the following things which running it through svgo would remove:

  • unnecessary (some of which is objectively wrong) precision, for example a path with M 7.9999999,12 H 7.0000001 L 6.5230038,12.545657 7.0000001,13 h 0.9999998 z. this should just be something like M 8,12 H 7 L 6.5230038,12.545657 7,13 h 1 z (not really sure what the 6.5230038 and 12.545657 are) because the svg is pixel-aligned.
  • extra license information that is not needed
  • a bunch of unnecessary stuff in the style attribute, which are all just defaults.
  • the style attribute in the first place, for which the only relevant thing is the fill and that can be replaced with the fill attribute.
  • a bunch of unnecessary xmlns declarations
  • a bunch of unnecessary id attributes
  • an unnecessary <title> tag

you can export as an "optimized svg" (file -> save as -> select "Optimized SVG" in the format dropdown. it can't be accessed through the normal export menu for some reason), which will fix some of these but will still leave some additional unnecessary stuff.

after spending a bit of time doing the following:

  • some manual optimization in inkscape (truncating all of that useless precision, removing unnecessary nodes in paths, etc.)
  • exporting as an optimized svg
  • running it through svgo
  • doing some additional optimizations by hand

here is a much smaller svg:

<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
    <path fill="#38342a" d="M9 1h1v1h1v1h1v1h1v1h1v1h1v2h-1v1h-2v1h-1v1h-1v1H9v2H8v1H6v-1H5v-1H4v-1H3v-1H2V9h1V8h1V7h1V6h1V5h1V4h1V2h1z"/>
    <path fill="#dbd0b4" d="M4 9V8h1V7h1V6h1l1-1V4h1V2h1v1h1v1h1v1h1v1l-1 1-2 3-3 3-3-3z"/>
    <path fill="#bcb29c" d="M9 3h1v1h1v1h1v1h1v1h-1L9 4zM10 10h1V9h1V7h-1v1h-1zH8v2h1v-1h1zM8 12H7v1h1z"/>
    <path fill="#c6bca5" d="M7 5h1v2h3v1H9V6H7zM6 8h1v2h2V9H6z"/>
    <path fill="#aea694" d="M3 9v1l3 3h1v-1H6v-1H5v-1H4V9z"/>
    <path fill="#9a927e" d="M3 10v1h2v2h2v1H6v-2H4v-2z"/>
    <path fill="#807a6d" d="M13 7h1v1h-1z"/>
    <path fill="#aea694" d="M9 4v1h2v2h1V6h-2V4z"/>
</svg>
Without whitespace
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="#38342a" d="M9 1h1v1h1v1h1v1h1v1h1v1h1v2h-1v1h-2v1h-1v1h-1v1H9v2H8v1H6v-1H5v-1H4v-1H3v-1H2V9h1V8h1V7h1V6h1V5h1V4h1V2h1z"/><path fill="#dbd0b4" d="M4 9V8h1V7h1V6h1l1-1V4h1V2h1v1h1v1h1v1h1v1l-1 1-2 3-3 3-3-3z"/><path fill="#bcb29c" d="M9 3h1v1h1v1h1v1h1v1h-1L9 4zM10 10h1V9h1V7h-1v1h-1zH8v2h1v-1h1zM8 12H7v1h1z"/><path fill="#c6bca5" d="M7 5h1v2h3v1H9V6H7zM6 8h1v2h2V9H6z"/><path fill="#aea694" d="M3 9v1l3 3h1v-1H6v-1H5v-1H4V9z"/><path fill="#9a927e" d="M3 10v1h2v2h2v1H6v-2H4v-2z"/><path fill="#807a6d" d="M13 7h1v1h-1z"/><path fill="#aea694" d="M9 4v1h2v2h1V6h-2V4z"/></svg>

ofc, newlines & spaces are just for viewing & can be completely removed.

sizes:

  • uncompressed: 670 bytes
  • gzip: 351 bytes
  • zstd: 345 bytes
  • brotli: 313 bytes

now, once compressed, it's 130-170 bytes smaller than the png image.

teunjojo added a commit to teunjojo/community that referenced this pull request Jul 24, 2025
Copied from comment on pull request FabricMC#101 because original author is not responding.
FabricMC#101 (comment)

Co-authored-by: solonovamax <solonovamax@12oclockpoint.com>
@teunjojo teunjojo mentioned this pull request Jul 24, 2025
@Arttale
Copy link

Arttale commented Sep 15, 2025

I expect random people coming in here looking around for this issue so they can implement the fabric icon into their readme file.
so here you go.
These are just the svg teunjojo has edited embedded into the URL in base64 with the formating shield io provided
Made for fabric

[![Fabric](https://img.shields.io/badge/Made%20For-Fabric-blue.svg?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjMzgzNDJhIiBkPSJNOSAxaDF2MWgxdjFoMXYxaDF2MWgxdjFoMXYyaC0xdjFoLTJ2MWgtMXYxaC0xdjFIOXYySDh2MUg2di0xSDV2LTFINHYtMUgzdi0xSDJWOWgxVjhoMVY3aDFWNmgxVjVoMVY0aDFWMmgxeiIvPjxwYXRoIGZpbGw9IiNkYmQwYjQiIGQ9Ik00IDlWOGgxVjdoMVY2aDFsMS0xVjRoMVYyaDF2MWgxdjFoMXYxaDF2MWwtMSAxLTIgMy0zIDMtMy0zeiIvPjxwYXRoIGZpbGw9IiNiY2IyOWMiIGQ9Ik05IDNoMXYxaDF2MWgxdjFoMXYxaC0xTDkgNHpNMTAgMTBoMVY5aDFWN2gtMXYxaC0xekg4djJoMXYtMWgxek04IDEySDd2MWgxeiIvPjxwYXRoIGZpbGw9IiNjNmJjYTUiIGQ9Ik03IDVoMXYyaDN2MUg5VjZIN3pNNiA4aDF2MmgyVjlINnoiLz48cGF0aCBmaWxsPSIjYWVhNjk0IiBkPSJNMyA5djFsMyAzaDF2LTFINnYtMUg1di0xSDRWOXoiLz48cGF0aCBmaWxsPSIjOWE5MjdlIiBkPSJNMyAxMHYxaDJ2MmgydjFINnYtMkg0di0yeiIvPjxwYXRoIGZpbGw9IiM4MDdhNmQiIGQ9Ik0xMyA3aDF2MWgtMXoiLz48cGF0aCBmaWxsPSIjMzgzNDJhIiBkPSJNOSA0djFoMnYyaDFWNmgtMlY0eiIvPjwvc3ZnPgo=)](https://fabricmc.net/)

Made with fabric API

[![Fabric](https://img.shields.io/badge/Made%20With-Fabric%20API-blue.svg?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjMzgzNDJhIiBkPSJNOSAxaDF2MWgxdjFoMXYxaDF2MWgxdjFoMXYyaC0xdjFoLTJ2MWgtMXYxaC0xdjFIOXYySDh2MUg2di0xSDV2LTFINHYtMUgzdi0xSDJWOWgxVjhoMVY3aDFWNmgxVjVoMVY0aDFWMmgxeiIvPjxwYXRoIGZpbGw9IiNkYmQwYjQiIGQ9Ik00IDlWOGgxVjdoMVY2aDFsMS0xVjRoMVYyaDF2MWgxdjFoMXYxaDF2MWwtMSAxLTIgMy0zIDMtMy0zeiIvPjxwYXRoIGZpbGw9IiNiY2IyOWMiIGQ9Ik05IDNoMXYxaDF2MWgxdjFoMXYxaC0xTDkgNHpNMTAgMTBoMVY5aDFWN2gtMXYxaC0xekg4djJoMXYtMWgxek04IDEySDd2MWgxeiIvPjxwYXRoIGZpbGw9IiNjNmJjYTUiIGQ9Ik03IDVoMXYyaDN2MUg5VjZIN3pNNiA4aDF2MmgyVjlINnoiLz48cGF0aCBmaWxsPSIjYWVhNjk0IiBkPSJNMyA5djFsMyAzaDF2LTFINnYtMUg1di0xSDRWOXoiLz48cGF0aCBmaWxsPSIjOWE5MjdlIiBkPSJNMyAxMHYxaDJ2MmgydjFINnYtMkg0di0yeiIvPjxwYXRoIGZpbGw9IiM4MDdhNmQiIGQ9Ik0xMyA3aDF2MWgtMXoiLz48cGF0aCBmaWxsPSIjMzgzNDJhIiBkPSJNOSA0djFoMnYyaDFWNmgtMlY0eiIvPjwvc3ZnPgo=)](https://fabricmc.net/)

Fabric API+version

[![Fabric](https://img.shields.io/badge/Fabric%20API-v0.133.4+1.21.8-blue.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjMzgzNDJhIiBkPSJNOSAxaDF2MWgxdjFoMXYxaDF2MWgxdjFoMXYyaC0xdjFoLTJ2MWgtMXYxaC0xdjFIOXYySDh2MUg2di0xSDV2LTFINHYtMUgzdi0xSDJWOWgxVjhoMVY3aDFWNmgxVjVoMVY0aDFWMmgxeiIvPjxwYXRoIGZpbGw9IiNkYmQwYjQiIGQ9Ik00IDlWOGgxVjdoMVY2aDFsMS0xVjRoMVYyaDF2MWgxdjFoMXYxaDF2MWwtMSAxLTIgMy0zIDMtMy0zeiIvPjxwYXRoIGZpbGw9IiNiY2IyOWMiIGQ9Ik05IDNoMXYxaDF2MWgxdjFoMXYxaC0xTDkgNHpNMTAgMTBoMVY5aDFWN2gtMXYxaC0xekg4djJoMXYtMWgxek04IDEySDd2MWgxeiIvPjxwYXRoIGZpbGw9IiNjNmJjYTUiIGQ9Ik03IDVoMXYyaDN2MUg5VjZIN3pNNiA4aDF2MmgyVjlINnoiLz48cGF0aCBmaWxsPSIjYWVhNjk0IiBkPSJNMyA5djFsMyAzaDF2LTFINnYtMUg1di0xSDRWOXoiLz48cGF0aCBmaWxsPSIjOWE5MjdlIiBkPSJNMyAxMHYxaDJ2MmgydjFINnYtMkg0di0yeiIvPjxwYXRoIGZpbGw9IiM4MDdhNmQiIGQ9Ik0xMyA3aDF2MWgtMXoiLz48cGF0aCBmaWxsPSIjMzgzNDJhIiBkPSJNOSA0djFoMnYyaDFWNmgtMlY0eiIvPjwvc3ZnPgo=)](https://fabricmc.net/)

Fabric

Fabric

Fabric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants