[GH-ISSUE #93] [REQUEST] Smaller Flag Size #59

Closed
opened 2026-03-03 14:34:18 +03:00 by kerem · 8 comments
Owner

Originally created by @semplon on GitHub (Aug 26, 2015).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/93

Hello, this is awesome. I've just implemented it into my cms for multi language purpose. After I implemented it on my cms, the size become huge. The flags files need at least 10MB for it. Some of flags had more than 2KB. Can you please make the flags size become standard ? 1KB is a great choice if it can. So the load of the flags not bloating anymore and the disk used become less.

Thank You,

Originally created by @semplon on GitHub (Aug 26, 2015). Original GitHub issue: https://github.com/lipis/flag-icons/issues/93 Hello, this is awesome. I've just implemented it into my cms for multi language purpose. After I implemented it on my cms, the size become huge. The flags files need at least 10MB for it. Some of flags had more than 2KB. Can you please make the flags size become standard ? 1KB is a great choice if it can. So the load of the flags not bloating anymore and the disk used become less. Thank You,
kerem closed this issue 2026-03-03 14:34:18 +03:00
Author
Owner

@lipis commented on GitHub (Aug 26, 2015):

Not very doable with SVGs.. (even though there is a plan to optimise them) so what you can do is to choose your preferable size and transform them into PNGs or something..

P.S. There were requests to include the PNGs in this project.. but since there could be many different sizes.. they won't be included at all :)

<!-- gh-comment-id:134873488 --> @lipis commented on GitHub (Aug 26, 2015): Not very doable with SVGs.. (even though there is a plan to optimise them) so what you can do is to choose your preferable size and transform them into PNGs or something.. P.S. There were requests to include the PNGs in this project.. but since there could be many different sizes.. they won't be included at all :)
Author
Owner

@tbaddade commented on GitHub (Aug 26, 2015):

You can use a compressor, like this one. http://petercollingridge.appspot.com/svg-editor

E.g. rs.svg File
Original file size: 883.9 kB
Optimised file size: 533.2 kB (60.3%)

<!-- gh-comment-id:134893237 --> @tbaddade commented on GitHub (Aug 26, 2015): You can use a compressor, like this one. http://petercollingridge.appspot.com/svg-editor E.g. rs.svg File Original file size: 883.9 kB Optimised file size: 533.2 kB (60.3%)
Author
Owner

@semplon commented on GitHub (Aug 26, 2015):

Hmm I see, I'll try to edit it one by one so it considerable.

<!-- gh-comment-id:134934857 --> @semplon commented on GitHub (Aug 26, 2015): Hmm I see, I'll try to edit it one by one so it considerable.
Author
Owner

@lipis commented on GitHub (Aug 26, 2015):

I tried the svgo in the past, but it was ruining some flags.. never got the time to find see if it's breaking less these days..

<!-- gh-comment-id:135179499 --> @lipis commented on GitHub (Aug 26, 2015): I tried the [svgo](https://github.com/svg/svgo) in the past, but it was ruining some flags.. never got the time to find see if it's breaking less these days..
Author
Owner

@CemDemirkartal commented on GitHub (Aug 30, 2015):

You have to delete metadata and combine sturctures in svg because all are seperated. This is totally awful size of svg. with junk data. Nobody needs meta in background-image.

And why 512px ?
You have background-size: contain; in css. Even it can be 1px too. Doesnt need big numbers to calculate and waste traffic in websites

Optimize by myself (CorelDraw X7 SVG Export + Text editor)
I reduced 1x1/tr.svg 1.57 kb to 409 byte
-> Size 100px
-> Include
-> No SVG tag attributes (only width/height/xmlns)
-> No Metadata and Comment
-> No id in tags

SVG tag attributes are useless mostly, You can save more by deleting not needed parts.

<!-- gh-comment-id:136156173 --> @CemDemirkartal commented on GitHub (Aug 30, 2015): You have to delete metadata and combine sturctures in svg because all are seperated. This is totally awful size of svg. with junk data. Nobody needs meta in background-image. And why 512px ? You have background-size: contain; in css. Even it can be 1px too. Doesnt need big numbers to calculate and waste traffic in websites Optimize by myself (CorelDraw X7 SVG Export + Text editor) I reduced 1x1/tr.svg 1.57 kb to 409 byte -> Size 100px -> Include <?xml version="1.0" encoding="UTF-8"?> -> No SVG tag attributes (only width/height/xmlns) -> No Metadata and Comment -> No id in tags SVG tag attributes are useless mostly, You can save more by deleting not needed parts.
Author
Owner

@lipis commented on GitHub (Aug 30, 2015):

easier said than done.. doing that to all files without ruining some of them..

<!-- gh-comment-id:136173305 --> @lipis commented on GitHub (Aug 30, 2015): easier said than done.. doing that to all files without ruining some of them..
Author
Owner

@CemDemirkartal commented on GitHub (Aug 30, 2015):

I'm started to interest in different way of it. I try to find easylier way. Some of flags are out of the real drawing elements, according to flags in Wikipedia. The program which you used, it doesnt use SVG's rendering elements like circle and etc. It's only in basic level.

CorelDraw is not the best tool for it. I seen that too high detailed flags are getting broken like US flag. CorelDraw changes cordinates to strange type of numbers. Originals in wikipedia so nice.

But only withot not needed tags it reduces size.

<!-- gh-comment-id:136174169 --> @CemDemirkartal commented on GitHub (Aug 30, 2015): I'm started to interest in different way of it. I try to find easylier way. Some of flags are out of the real drawing elements, according to flags in Wikipedia. The program which you used, it doesnt use SVG's rendering elements like circle and etc. It's only in basic level. CorelDraw is not the best tool for it. I seen that too high detailed flags are getting broken like US flag. CorelDraw changes cordinates to strange type of numbers. Originals in wikipedia so nice. But only withot not needed tags it reduces size.
Author
Owner

@lipis commented on GitHub (Sep 4, 2015):

Some of them are optimised... this is an ongoing process..

<!-- gh-comment-id:137820919 --> @lipis commented on GitHub (Sep 4, 2015): Some of them are optimised... this is an ongoing process..
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#59
No description provided.