element-hq / element-hq/synapse
Synapse Expires `og:image` for URL preview despire not being allowed by spec.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
The `og:image` URL returned from [` /_matrix/client/v1/media/preview_url`](https://spec.matrix.org/v1.15/client-server-api/#get_matrixclientv1mediapreview_url) expires.
This is not allowed by spec and causes breakage in clients.
### Steps to reproduce
1. Send a link to an image.
2. See that the URL preview appears.
3. Wait (an hour usually does it)
4. Click the image to load the full-size.
## Expected
The image loads.
## Observed
The image URL returns 404.
### Homeserver
kevincox.ca
### Synapse Version
1.133.0
### Installation Method
Other (please mention below)
### Database
PostgreSQL, one server, never squite, never restored from backup
### Workers
Single process
### Platform
NixOS
### Configuration
URL previews
### Relevant log output
```shell
none
```
### Anything else that would be useful to know?
Originally reported to element-web here https://github.com/element-hq/element-web/issues/30238 where they pointed out that this is because the server is not following the spec.
This is probably also a spec bug, as it doesn't provide any mechanism for expiry which should probably be considered/allowed on basically every type of content as we can't expect everything to be stored forever.
Contributor guide
Assessment
This issue has not been assessed yet.