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

Use a sprite for the emojis instead of the automated single svgs #2

Open
nikolov-tmw opened this issue Jul 4, 2017 · 0 comments
Open

Comments

@nikolov-tmw
Copy link
Collaborator

@sbouafif suggested on the WordPress.org forums that we create a sprite and load all of the emojis from it, instead of the way it works right now(I believe the WordPress emoji script goes in the DOM and replaces all emojis with the corresponding SVGs from s.w.org.

The main challenge I see here is that there seem to be about 1014 or so emojis registered in script.js - that's a lot.

We'd need an automated script that would download locally all of the svgs for our registered emojis and then merge them into one big SVG(with something like svg-sprite? ).

The question is if there will be any speed benefit(that's relative due to connectivity speeds to your own site vs s.w.org). After all requests should be cached(at least the ones to s.w.org, whereas they might not be cached on all hosting providers - which would actually degrade performance).

So in the end, I'm not certain how much of a benefit it would be to create a sprite, vs load all emojis one by one.

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

No branches or pull requests

1 participant