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

Emoij image too large (over 7MB) #106

Open
jhades opened this issue Jun 9, 2020 · 3 comments
Open

Emoij image too large (over 7MB) #106

jhades opened this issue Jun 9, 2020 · 3 comments

Comments

@jhades
Copy link

jhades commented Jun 9, 2020

Hello everyone, although I would love to use quill-emoji, I had to turn it off because the emoji image is too large (over 7MB).
On an IPhone over fast Wifi, the first time that the user opens the emoji icon it takes a long time to load and the website is unresponsive, looking broken to the user.
To reduce the size of the image It would be ideal to have multiple sets of emojis to choose from via configuration, instead of only the full list of emojis.
At least an alternative set of emojis including only the most commonly used 100 ones or so would be great to have.

@imhvost
Copy link

imhvost commented Aug 11, 2020

Hello everyone, although I would love to use quill-emoji, I had to turn it off because the emoji image is too large (over 7MB).
On an IPhone over fast Wifi, the first time that the user opens the emoji icon it takes a long time to load and the website is unresponsive, looking broken to the user.
To reduce the size of the image It would be ideal to have multiple sets of emojis to choose from via configuration, instead of only the full list of emojis.
At least an alternative set of emojis including only the most commonly used 100 ones or so would be great to have.

.ap{
  background-image:url(emoji-sprite.png);
}

@media (-webkit-min-device-pixel-ratio: 2),
  (-o-min-device-pixel-ratio: 2/1),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx){
    .ap{
      background-image:url(emoji-sprite@2x.png);
  }
}

emoji-sprite.png

emoji-sprite

emoji-sprite@2x.png

emoji-sprite@2x

@MartinMalinda
Copy link

If you want to just not use the image and rely on unicode, do this:

#emoji-palette .ap, .ql-emojiblot .ap {
  background-image: none;
  text-indent: 0;
  /* It's also possible to adjust spacing. To make selecting emojis easier */
  /* width: 25px; */
  /* height: 25px; */
}

Screenshot 2021-10-22 at 16 35 27

It might happen that some emoji won't render to certain users though. It can still be worth it, rather than loading such a large image.

@ginobean
Copy link

ginobean commented Aug 1, 2023

Thanks, @MartinMalinda ! I was prepared to remove quill-emoji due to the 7MB issue, until I discovered your post.

Frankly, I think his css setting should be the default, going forwards.

I was not happy to discover the 7MB issue. Only reason I discovered this was that I noticed that my app seemed to freeze on first load, on my mobile device. Then, I realized it was just taking a long time to download..

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

No branches or pull requests

4 participants