[GH-ISSUE #1107] File size and civil flags #520

Closed
opened 2026-03-03 14:38:59 +03:00 by kerem · 3 comments
Owner

Originally created by @sandstrom on GitHub (Jun 15, 2023).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/1107

Thanks for a great repo!

Since these are mostly used for icons, size is somewhat of a factor. Having a 187 kb icon isn't ideal.

Would you be open to reducing the file size using this principle?

For any flag/country above 25kb in size, if there are multiple official flags (both a civil and a state flag, for example), the flag with the smallest file-size should be used.

It would allow us to use a much smaller file for Russia, Bolivia, Spain and a few others that are currently quite large. It would also seem like a fairly neutral principle, where we'd still allow large file sizes if there isn't a reasonable alternative.

https://en.wikipedia.org/wiki/Civil_flag
https://en.wikipedia.org/wiki/State_flag

Second wiki article contains a list of examples of state vs. civil flag.

Other benefits

  1. The civil flag is generally the most well known, so people will have an easier time mapping flag to country when the civil version is used.

  2. Since these are meant to be used for icons, when displayed as a small icon, they are generally much easier to read when they don't contain too much detail.

image

Example from macOS, the details of these icons aren't rely legible anyway.

Originally created by @sandstrom on GitHub (Jun 15, 2023). Original GitHub issue: https://github.com/lipis/flag-icons/issues/1107 Thanks for a great repo! Since these are mostly used for icons, size is somewhat of a factor. Having a 187 kb icon isn't ideal. Would you be open to reducing the file size using this principle? > For any flag/country above 25kb in size, if there are multiple official flags (both a civil and a state flag, for example), the flag with the smallest file-size should be used. It would allow us to use a much smaller file for Russia, Bolivia, Spain and a few others that are currently quite large. It would also seem like a fairly neutral principle, where we'd still allow large file sizes if there isn't a reasonable alternative. https://en.wikipedia.org/wiki/Civil_flag https://en.wikipedia.org/wiki/State_flag Second wiki article contains a list of examples of state vs. civil flag. ### Other benefits 1. The civil flag is generally the most well known, so people will have an easier time mapping flag to country when the civil version is used. 2. Since these are meant to be used for icons, when displayed as a small icon, they are generally much easier to read when they don't contain too much detail. ![image](https://github.com/lipis/flag-icons/assets/122287/88d9e499-4747-4d04-86a7-f818924d63c0) *Example from macOS, the details of these icons aren't rely legible anyway.*
kerem closed this issue 2026-03-03 14:38:59 +03:00
Author
Owner

@NotTsunami commented on GitHub (Jun 19, 2023):

I'll leave this open as a general note to look for the optimization of flags as a whole, but I will veto this for now. I'd rather approach this from the angle of optimizing some of the more complex/larger flags. There are definitely several flags we can work on achieving a smaller file size on.

<!-- gh-comment-id:1597751845 --> @NotTsunami commented on GitHub (Jun 19, 2023): I'll leave this open as a general note to look for the optimization of flags as a whole, but I will veto this for now. I'd rather approach this from the angle of optimizing some of the more complex/larger flags. There are definitely several flags we can work on achieving a smaller file size on.
Author
Owner

@sandstrom commented on GitHub (Jun 20, 2023):

@NotTsunami I understand.

Another somewhat related question, what would you say is the appropriate flag to use for Russia? (just as an example)

https://en.wikipedia.org/wiki/Flag_of_Russia
https://commons.wikimedia.org/wiki/File:Russian_Embassy_in_London_%2851923829611%29.jpg

Because the flag they seem to be using themselves mostly is the civil version, which is different (smaller file size) than the one used in this project.

<!-- gh-comment-id:1598283422 --> @sandstrom commented on GitHub (Jun 20, 2023): @NotTsunami I understand. Another somewhat related question, what would you say is the appropriate flag to use for Russia? (just as an example) https://en.wikipedia.org/wiki/Flag_of_Russia https://commons.wikimedia.org/wiki/File:Russian_Embassy_in_London_%2851923829611%29.jpg Because the flag they seem to be using themselves mostly is the civil version, which is different (smaller file size) than the one used in this project.
Author
Owner

@lipis commented on GitHub (Jul 24, 2023):

Yes.. I agree with @NotTsunami.. let's not maintain so many flags! We can reduce sizes one flag at the time :)

<!-- gh-comment-id:1648434710 --> @lipis commented on GitHub (Jul 24, 2023): Yes.. I agree with @NotTsunami.. let's not maintain so many flags! We can reduce sizes one flag at the time :)
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#520
No description provided.