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

We allow room avatars to be set to SVGs, but they then fail silently #2581

Open
come-maiz opened this issue Nov 15, 2016 · 14 comments
Open

We allow room avatars to be set to SVGs, but they then fail silently #2581

come-maiz opened this issue Nov 15, 2016 · 14 comments
Labels
A-Avatar A-Media A-Room-View O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement

Comments

@come-maiz
Copy link

I'm trying to change the avatar in my room to this one: http://people.ubuntu.com/~elopio/testfiles/jaquerEspeis.svg

I go to the settings of the room and select the file, and it seems to load properly:
ekrankopio de 2016-11-14 22-51-38
However, after I save it, the default icon remains:
ekrankopio de 2016-11-14 23-01-24

I'm using ubuntu zesty, firefox 49.0 and https://riot.im/app/

@richvdh richvdh changed the title can't set room avatar We allow room avatars to be set to SVGs, but they then fail silently Nov 15, 2016
@richvdh
Copy link
Member

richvdh commented Nov 15, 2016

Yeah; SVGs don't work as room avatars. Updated the subject accordingly.

@richvdh
Copy link
Member

richvdh commented Nov 15, 2016

The problem is that the avatar is set successfully, but when vector attempts to show it in the room, it tries to fetch a thumbnail, which fails.

Not sure what the right solution is here. Should we display the full image if fetching the avatar fails (as we appear to do in the Room Settings on first update)?

@ara4n
Copy link
Member

ara4n commented Nov 25, 2016

We should do clientside-thumbnailing before uploading, i think, given we support this now for e2e attachments.

@ara4n
Copy link
Member

ara4n commented Nov 25, 2016

see also #1833 and #1962

@linuxtim
Copy link

linuxtim commented Jun 25, 2019

When set they kinda work (clicking on the default room icon shows the SVG), but most of the UI ignores them and uses a default circular+text icon.

Currently once you set the avatar to be an SVG, you don't seem to be able to change it to anything else using RIOT (I haven't tried with anything else), which is definitely a problem!

I'm testing with https://github.com/rust-embedded/wg/blob/master/assets/logo/ewg-logo-blue-white-on-transparent.svg

@turt2live
Copy link
Member

It should be possible to change them after setting, although the quick access might not be there anymore. The gear icon in the top right should bring you to room settings where you can click the square avatar and change it.

@linuxtim
Copy link

linuxtim commented Jun 25, 2019

Yes, the UI appears to offer that (as you described), but the change from svg to png doesn't seem to stick after the dialogue is closed (tried on both release and dev versions of RIOT).

  1. Set room avatar to https://github.com/rust-embedded/wg/blob/master/assets/logo/ewg-logo-blue-white-on-transparent.svg
  2. Set room avatar to https://github.com/rust-embedded/wg/blob/master/assets/logo/ewg-logo-blue-white-on-transparent.png

Browser: Firefox 67.0.4

@turt2live
Copy link
Member

hmm, does the save button become enabled? It doesn't apply immediately to give people an opportunity to say "oh no, that's the wrong avatar".

@linuxtim
Copy link

Can't see any save button.

@turt2live
Copy link
Member

That's more worrying. It should be here:
image

@linuxtim
Copy link

linuxtim commented Jun 25, 2019

OK, got it, sorry, because the avatar is off to the right, I didn't associate it with that save button, and assumed it would just immediately take effect (because no save button appeared to be associated with it).

The appearance is of a distinct element which is off in a right-hand side-bar I think.

So, the desired change worked, sorry for the noise on this bug, but probably the non-obviousness of the save button being associated with that preview is a UX bug.

@turt2live
Copy link
Member

Indeed, I've opened #10170 to track this.

@ara4n
Copy link
Member

ara4n commented Sep 17, 2019

as per #2008, we could just blat SVGs through https://github.com/cure53/DOMPurify to allow them in avatars.

@SimonBrandner SimonBrandner added A-Media O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist labels Dec 17, 2021
@LecrisUT
Copy link

Hello, we just got hit by this any news on this, and it seems to affect the other Element clients as well. Over at #2008, @revolunet was offering help, any luck on that front?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Avatar A-Media A-Room-View O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement
Projects
None yet
Development

No branches or pull requests

8 participants