Skip to content

Commit eeb6781

Browse files
kay0tickaycaio1516
andauthored
Update image upload docs (#25)
## 💸 TL;DR Explicitly state we support data URLs and clarify upload size limits. ## 🧪 Testing Steps / Validation `yarn start` <img width="996" height="328" alt="Screenshot 2026-01-16 at 12 29 00 PM" src="https://github.com/user-attachments/assets/467f0d99-e08e-4864-82f3-2186a55d824e" /> ## ✅ Checks <!-- Make sure your pr passes the CI checks and do check the following fields as needed - --> - [ ] CI tests (if present) are passing - [ ] Adheres to code style for repo - [ ] Contributor License Agreement (CLA) completed if not a Reddit employee Co-authored-by: Caio Araujo <caio.araujo@reddit.com>
1 parent 8a82256 commit eeb6781

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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)