element-android icon indicating copy to clipboard operation
element-android copied to clipboard

Allow media/images to be hidden by default and on-demand

Open t-m-w opened this issue 3 years ago • 1 comments

Your use case

What would you like to do?

Allow media (images, etc.) to be hidden, including by default, requiring a tap in order to be shown. Also allow shown images to be hidden, regardless of setting. This should be possible globally and on a per-room basis.

Why would you like to do it?

There are some rooms on the platform that receive frequent attacks that include posting of unpleasant images. There are other reasons someone might want this as well.

How would you like to achieve it?

Generally, this can be achieved in a similar manner to Mastodon, which is a platform that handles this very well. Some references: https://github.com/mastodon/mastodon/issues/336, https://github.com/mastodon/mastodon/issues/517.

Add toggles to the global settings and to per-room settings that disable auto-showing of media. The user can then tap to show or tap to hide the media.

When hidden, the media can either be obscured/blurred beyond recognition, or simply not shown in some other way. Some kind of text should indicate that the media is hidden, sensitive, etc. Tapping would show the media. Once shown, tapping again could either bring it to full-screen as usual or hide it. If tapping does not re-hide the media, there should be an added button to hide it. If it does, there should be an added button to bring it to full-screen instead.

Media should be automatically downloaded in the same manner that it is currently. Preventing auto-downloading of media should be handled via another setting, if it is to be handled. This potentially allows the client to severely blur/obscure the media prior to showing, and it allows the user to quickly device whether they want to re-hide the media, and for them to do so almost immediately.

See https://github.com/vector-im/element-web/issues/11687 for a similar issue.

Have you considered any alternatives?

Mjolnir can be, and has been, used to automatically delete images during volatile periods. However, this has a few main issues:

  1. It prevents anyone from posting media.
  2. There is a split-second period during which the media can be seen before bot.mjolnir removes it.

Additional context

I'm willing to provide a PR, but "able" is another question. :upside_down_face: I can try to take a look at it.

Are you willing to provide a PR?

Yes

t-m-w avatar Jul 11 '22 11:07 t-m-w

(Is this S-major or S-minor?)

dkasak avatar Sep 12 '22 10:09 dkasak