element-hq / element-hq/element-web

Can't see images in exported chats because they are hidden with style="display:none"

Open
#32,088 5 comments 0 reactions 0 assignees View on GitHub
A-Electron A-Export-Chat O-Occasional S-Major T-Defect X-Cannot-Reproduce
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Locate a conversation with images in Element desktop.
2. Click "Export Chat", download and unzip.
4. Verify "images" directory is present and contains the exported images.
5. Open "messages.html" in a browser (I tested with both Firefox and Chromium)
6. Images are not shown in the conversation.
7. Inspect HTML code in "messages.html": tags have style="display:none"

```
% find images
images
images/Screensho-8-22-2024 at 3-01-27 PM.jpg
images/imagejpeg_0-8-22-2024 at 4-57-59 PM.jpg

in messages.html:
63:Screensho.jpg
65:imagejpeg_0.jpg
```

### Outcome

I expected images to be visible.

But due to style="display:none" they are not. I looked for javascript that would later remove it or resize the image, but did not find any.

### Operating system

NixOS Linux

### Application version

Element version: 1.11.75 Crypto version: Rust SDK 0.7.1 (c8c9d15), Vodozemac 0.6.0

### How did you install the app?

Installed using NixOS derivation

### Homeserver

matrixdotorg/synapse:v1.110.0

### Will you send logs?

Yes

Contributor guide

Open the contributing guide

Research direction

Reproduce the export in Element desktop using a conversation with images, then inspect the Export Chat entry point and the generated messages.html. Compare the exported images directory with the HTML image tags and determine why they receive display:none. Done means exported images are visible when messages.html is opened in Firefox or Chromium.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.