Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions docs/capabilities/server/media-uploads.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Enable the `media` permission in your `devvit.json` file.
```

## Using media uploads
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.
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.

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


## Limitations
Supported file types are:
- GIF
- PNG
- JPEG

Maximum size is 20 MB.
The following file types are supported, along with a corresponding maximum size limit:
- JPEG, PNG, and WEBP: up to 20 MB
- GIF: up to 100 MB

### Notes

- When uploading through a data URL, the size limit is 7.5 MB regardless of file type due to request size limits.
- When uploading a WEBP image, it will be converted to JPEG. As such, the Reddit URL returned points to a JPEG image.