Skip to content

media requests on web return 404 #32803

@NeiroNz

Description

@NeiroNz

Steps to reproduce

all thumbnail requests /_matrix/media/v3/thumbnail/* return 404 code in web version(avatars do not shows)
But in App for Windows and Android - it shows.

Matrix Synapse in docker+nginx on host

and download has same effect

It is no browser depended...
Some has wrong in configuration, but what?
I full reconfigure nginx and Synapse to postgres. Element-Web is symlink in root /var/www/html.
Certificates a self-signed.

server {
        server_name nxn_svc.ru;

        listen 80;
        listen [::]:80;

        return 301 https://$host$request_uri;
}

server {
        server_name nxn-svc.ru;

        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        listen 8448 ssl;
        listen [::]:8448 ssl;

        ssl_certificate /etc/ssl/certs/nxn-svc.crt;
        ssl_certificate_key /etc/ssl/private/nxn-svc.key;

        ssl_protocols TLSv1.2 TLSv1.3;

        index index.html;

        location / {
            root /var/www/html;
        }
        location /.well-known/matrix/server {
            add_header Content-Type application/json;
            return 200 '{"m.server":"nxn-svc.ru:443"}';
        }
        location /.well-known/matrix/client {
            add_header Content-Type application/json;
            return 200 '{"m.homeserver":{"base_url":"https://nxn-svc.ru"}}';
        }
        location ~ ^(/_matrix|/_synapse/client|/_synapse/admin) {
            proxy_pass http://localhost:8008;
            proxy_http_version 1.1;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $host;
            client_max_body_size 50M;
        }
}

Log line for work client with 200 code:

2026-03-15 06:03:43,992 - synapse.access.http.8008 - 641 - INFO - GET-1852 - ::ffff:192.168.1.21 - 8008 - {@neiron:nxn-svc.ru} Processed request: 0.034sec/-0.000sec (0.012sec, 0.003sec) (0.003sec/0.012sec/2) 1104B 200 "GET /_matrix/client/v1/media/thumbnail/nxn-svc.ru/VrtTOyNrsbaNzJXYzBsxdfsy?width=14&height=14&method=crop&allow_redirect=true HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.12.12 Chrome/144.0.7559.173 Electron/40.4.1 Safari/537.36" [0 dbevts]

Log line for Web with 404 code:

2026-03-15 06:06:56,722 - synapse.access.http.8008 - 641 - INFO - GET-1966 - 192.168.1.21 - 8008 - {None} Processed request: 0.028sec/0.006sec (0.008sec, 0.002sec) (0.002sec/0.009sec/1) 45B 404 "GET /_matrix/media/v3/thumbnail/nxn-svc.ru/VrtTOyNrsbaNzJXYzBsxdfsy?width=32&height=32&method=crop&allow_redirect=true HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 YaBrowser/26.3.0.0 Safari/537.36" [0 dbevts]

Request uses different path. And Auth lose in forwarder...

How make it work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AvatarA-MediaO-UncommonMost users are unlikely to come across this or unexpected workflowS-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-DefectX-Needs-InfoThis issue is blocked awaiting information from the reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions