Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Custom-Emoji: Set Emoji Dimensions

Open xandershelley opened this issue 10 years ago • 28 comments

Emoji size is set by a span class that causes all emojis to have the same height and width. This can be overwriten in the custom css area, but not all emojis look good at any one defined size.

It would be awesome if it were possible to define a size for the emoji in menu during the upload process, or be able to define what span class it should use, or atleast have it respect the original dimensions of the file.

@nokobon

xandershelley avatar Sep 23 '16 10:09 xandershelley

+1 I have many images that I would like to use as custom emoji, that only look good in their original dimensions.

It makes sense to scale emoji down inside a text message, but in an emoji-only message, it would be great if the image would be shown in its original size. In both cases, the original aspect ratio should be maintained.

fnordsh avatar Sep 25 '16 18:09 fnordsh

+1 Does anyone know what the current maximum dimensions are for emoji uploading?

JD-Hughes avatar Oct 02 '16 21:10 JD-Hughes

+1 We added some meme's as custom emoji. Would be great if they stayed the original size if you use them in an emoji-only message. Maybe allow to set a max size?

johanneszink avatar Oct 13 '16 14:10 johanneszink

Max size should be the original image dimensions, imho. Upscaling looks ugly, and I can easily resize the images before I upload them, if the originals are too big.

fnordsh avatar Oct 13 '16 14:10 fnordsh

Agreed, upscaling should be avoided. Max size shouldn't be larger than the original picture/emoji. I thought about using this as a restriction to prevent pictures from being to large if you don't want to touch everything before uploading :)

johanneszink avatar Oct 13 '16 14:10 johanneszink

Okay, resizing the images before upload is not a real problem, but still an annoyance, agreed. But setting a max image size might become more than just a convenience feature when RocketChat/feature-requests#769 gets implemented. (I suspect I have some users who would probably use FullHD emoji if they could...)

fnordsh avatar Oct 13 '16 14:10 fnordsh

Custom emoji dimensions would be nice. We are using some faces like Bob Ross as emojis and they are only funny if they are big enough!

murmelbahn avatar Oct 18 '16 10:10 murmelbahn

Any progress on this?

fnordsh avatar Apr 25 '17 08:04 fnordsh

still small useless emoji size :(

Frankstar avatar May 12 '17 19:05 Frankstar

+1 @Frankstar is still unhappy and bothers me^^

campferer avatar Sep 08 '17 10:09 campferer

.emoji.big {
	width: 200px !important;
	height: 150px !important;
}

A workaround would be to add the lines above with your desired dimensions under Admiistration/Layout/Custom CSS As far as i can see, this only affects the custom emojis, the build in emojis use different css classes.

campferer avatar Sep 08 '17 10:09 campferer

@rocket-cat close

I'm closing this. This would break the UI / UX and is simply achieved/hacked by custom CSS. If you disagree, please elaborate on why this would be important for a larger amount of people and please also elaborate on how one should solve the ramifications for the UI (emoji-reactions being different in size, sidebar last message emojis and so on).

Cheers Thomas

TwizzyDizzy avatar Mar 03 '18 16:03 TwizzyDizzy

@TwizzyDizzy Please explain how I can use custom CSS to make my custom emoji appear with their original size (as defined in the PNG). I had the impression that the inability to do just that was the whole point of this issue.

fnordsh avatar Mar 04 '18 13:03 fnordsh

@gertmenke lol check @c-ampferer answer.... its just right above Twizzy's one...

Viktova avatar Mar 21 '18 10:03 Viktova

@SecKarma Nope, that sets one size for all custom emoji.

fnordsh avatar Mar 21 '18 10:03 fnordsh

@gertmenke thats the way to go. feel free to improve it and post a patch

Frankstar avatar Mar 21 '18 10:03 Frankstar

@Frankstar Since I have very little JS/CSS experience and know nothing about Meteor, could you give me a pointer in the right direction? I imagine somewhere in the code it enforces fixed image dimensions, where it shouldn't. Just removing that should cause the Browser to render the image with its original dimensions, right? Feels like it sould be a one-line-fix - the thing is, I have no idea where to look for it.

fnordsh avatar Mar 21 '18 11:03 fnordsh

Update in 0.66 this should work (example size)

.emoji {
	width: 250px !important;
	height: 200px !important;
}

as the .emoji.big is no longer recognizable

Viktova avatar Jul 02 '18 10:07 Viktova

Custom emoji are still being forced to fixed dimensions. :-(

fnordsh avatar Jul 02 '18 10:07 fnordsh

??? gertmenke - stop "spam" this issues. SecKarma posted a way to fix this.

its closed anyway ...

Frankstar avatar Jul 02 '18 10:07 Frankstar