An00nymushun / DiscordFreeEmojis

229 stars 119 forks source link

[Feature Request] Add size option #1

Closed aarondoet closed 4 years ago

aarondoet commented 4 years ago

Usually if you send an emoji it has a size of about 32 if in a message with other content and a size of about 64 if sent in a message with no other content. When sending the raw image link it has a size of 128 which is way bigger than emojis usually are. With a setting where you can set the size to a power of 2 would be nice, so that emojis sent with this plugin are not way bigger than normal emojis. The setting should allow options 16, 32, 64 and 128.

This can be achieved by just adding &size=64 (with the desired number instead of 64) behind the emoji url. I would implement it something like this:

emojiUrl.split("?")[0] + `?size=${size}`
An00nymushun commented 4 years ago

There is some extra time for those to load because they aren't cached, plus phones upscale them so they will be pretty ugly but I will make a version with the size 64 ones Thanks for telling me, and do you know any place where discord actually uses the size parameter for emojis? Wouldn't want them to just remove the feature

aarondoet commented 4 years ago

There is some extra time for those to load because they aren't cached

that might be the case for you as the user who sends it but usually other people don't even have it cached yet so it makes no difference for them (or even makes it faster since the image is a bit smaller)

do you know any place where discord actually uses the size parameter for emojis?

sadly i don't but that feature should not be too hard to implement and i doubt they will change it soon. without knowing anything about this i would assume that it is just the same mechanism as for avatar urls so it just works with size parameter even though it might not be used.

QDaves commented 4 years ago

thats the exacly same feature request I wanted write. 16x16 is to small 32x32 is fine with text content without 64x64 should be okay

An00nymushun commented 3 years ago

A small update on this, I have found out that they actually use this parameter in the Android version of Discord (it's still calculated instead of just being hardcoded something like 64). Anyway, the available values are 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 1280, 1536, 2048, 3072, 4096

QDaves commented 3 years ago

Great to hear, will you implement it? Looking forward to see an update here soon 👍

An00nymushun commented 3 years ago

Great to hear, will you implement it? Looking forward to see an update here soon 👍

I'm not sure what you are talking about, there is a 64px version of the plugin for both BD, userscript and standalone.