Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag sprite is Base64 Encoded causing a 30% increase in size #21

Closed
MatthewAry opened this issue Nov 1, 2019 · 3 comments
Closed

Flag sprite is Base64 Encoded causing a 30% increase in size #21

MatthewAry opened this issue Nov 1, 2019 · 3 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@MatthewAry
Copy link

Just thought you should know that Base64 encoding images should be avoided. See: https://stackoverflow.com/a/11402374/2719773

The production JS files seem to have the flag sprite embedded as a Base64 string. I think that this is not necessary. Modern server and HTTP protocols help minimize the impact of making multiple requests for resources. I think that it will have a better impact on overall build sizes with minimal performance impact by requesting the image as a file instead of parsing the string.

@ubaldop
Copy link
Owner

ubaldop commented Nov 2, 2019

Hi Matthew, thank you for pointing that. Indeed, in previous versions of the component the image was not Base64 encoded. Later, I encoded it because of an issue (see #11).
If your proposal is a way to reduce component size, please help me in doing that ☺️
Otherwise I'll try to improve it as soon as I can find some free time.

@ubaldop ubaldop added the enhancement New feature or request label Apr 11, 2020
@ubaldop
Copy link
Owner

ubaldop commented Apr 11, 2020

Despite a bigger size of the final package, at the moment I stay with a Base64 encoded sprite in the css. The main reason is to make this component independent from any bundling process.

Here it is an interesting discussion about that.

I leave this as an enhancement proposal though.

@ubaldop ubaldop added the duplicate This issue or pull request already exists label Nov 10, 2020
@ubaldop
Copy link
Owner

ubaldop commented Nov 10, 2020

Duplicate, see #30.

@ubaldop ubaldop closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants