Skip to content

Commit fb2cfb7

Browse files
committed
Update media docs
1 parent 6dd1c09 commit fb2cfb7

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

docs/capabilities/server/media-uploads.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Enable the `media` permission in your `devvit.json` file.
2222
```
2323

2424
## Using media uploads
25-
On the server, you can pass the URL of any remotely hosted image (even if its not hosted on Reddit) to the `media.upload` function. The media function will return a Reddit URL.
25+
On the server, you can pass the URL of any remotely hosted image (even if its not hosted on Reddit) to the `media.upload` function. This function will return a Reddit URL. Both HTTP and data URLs are supported.
2626

2727
<Tabs>
2828
<TabItem value="web" label="Devvit Web">
@@ -50,9 +50,12 @@ On the server, you can pass the URL of any remotely hosted image (even if its no
5050

5151

5252
## Limitations
53-
Supported file types are:
54-
- GIF
55-
- PNG
56-
- JPEG
5753

58-
Maximum size is 20 MB.
54+
The following file types are supported, along with a corresponding maximum size limit:
55+
- JPEG, PNG, and WEBP: up to 20 MB
56+
- GIF: up to 100 MB
57+
58+
### Notes
59+
60+
- When uploading through a data URL, the size limit is 7.5 MB regardless of file type due to request size limits.
61+
- When uploading a WEBP image, it will be converted to JPEG. As such, the Reddit URL returned points to a JPEG image.

0 commit comments

Comments
 (0)