Skip to content

Commit fed4c2b

Browse files
committed
Optimize images
1 parent 0696652 commit fed4c2b

File tree

396 files changed

+188
-948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+188
-948
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Something that requires warning here
4848

4949
Currently the following types are available: `info`, `warn`, `danger` and `preview`
5050

51-
![Available alert types](static/images/alerts.png)
51+
![Available alert types](static/images/alerts.webp)
5252

5353
### MDX Components
5454

@@ -68,7 +68,7 @@ Available options for `icon`:
6868

6969
###### Example
7070

71-
![Collapsible MDX Component with the list icon](static/images/mdx-collapsible.png)
71+
![Collapsible MDX Component with the list icon](static/images/mdx-collapsible.webp)
7272

7373
```markdown
7474
<Collapsible title="Title" description="Description text" icon="list">
@@ -82,7 +82,7 @@ Buttons are simply... clickable buttons. They take `href` and `color` as argumen
8282

8383
###### Example
8484

85-
![Button MDX Component](static/images/mdx-button.png)
85+
![Button MDX Component](static/images/mdx-button.webp)
8686

8787
```markdown
8888
<LinkButton to="https://discord.com/developers/docs/getting-started" color="brand" text="click the button!" />
@@ -94,7 +94,7 @@ Cards let you display links in a card format. They accept two arguments, `title`
9494

9595
###### Example
9696

97-
![Card MDX Component](static/images/mdx-card.png)
97+
![Card MDX Component](static/images/mdx-card.webp)
9898

9999
```markdown
100100
<Card title="Card Title" link="https://discord.com/developers/docs/getting-started">

docs/activities/building-an-activity.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It assumes an understanding of [JavaScript](https://developer.mozilla.org/en-US/
1616

1717
<Collapsible title="What we'll be building" icon="view">
1818

19-
![Building Your First Activity Tutorial](images/activities/tutorial-hero.png)
19+
![Building Your First Activity Tutorial](images/activities/tutorial-hero.webp)
2020

2121
</Collapsible>
2222

@@ -145,7 +145,7 @@ You can learn more about the OAuth flow and redirect URIs in the [OAuth2 documen
145145

146146
Click on **OAuth2** on the sidebar in your app's settings. Under **Redirects**, enter `https://127.0.0.1` as a placeholder value then click **Save Changes**.
147147

148-
![Redirect URI in Activity Settings](images/activities/oauth2-redirect.png)
148+
![Redirect URI in Activity Settings](images/activities/oauth2-redirect.webp)
149149

150150
### Fetch Your OAuth2 Credentials
151151

@@ -310,7 +310,7 @@ Because Activities are in a sandbox enviornment and go through the Discord proxy
310310
311311
Back in your app's settings, click on the **URL Mappings** page under **Activities** on the left-hand sidebar. Enter the URL you generated from `cloudflared` in the previous step.
312312
313-
![Configuring your URL Mapping](images/activities/url-mapping-tutorial.png)
313+
![Configuring your URL Mapping](images/activities/url-mapping-tutorial.webp)
314314
315315
| PREFIX | TARGET |
316316
|--------|-----------------------------------------|
@@ -324,7 +324,7 @@ Next, we'll need to enable Activities for your app. On the left hand sidebar und
324324
325325
Find the first checkbox, labeled `Enable Activities`. Turn it on 🎉
326326
327-
![Enabling Activities in Settings](images/activities/enable-activities.png)
327+
![Enabling Activities in Settings](images/activities/enable-activities.webp)
328328
329329
#### Default Entry Point Command
330330
@@ -341,7 +341,7 @@ Navigate to your Discord test server and, in any voice and or text channel, open
341341
342342
Clicking on your app will launch your locally running app from inside Discord!
343343
344-
![Running your activity](images/activities/start-activity.png)
344+
![Running your activity](images/activities/start-activity.webp)
345345
346346
:::info
347347
**Customizing your Activity**
@@ -541,7 +541,7 @@ document.querySelector('#app').innerHTML = `
541541
542542
Now if we relaunch our app, we'll be prompted to authorize with Discord using the `identify`, `guilds`, and `applications.commands` scopes.
543543
544-
![Prompt to authorize Activity](images/activities/tutorial-auth.png)
544+
![Prompt to authorize Activity](images/activities/tutorial-auth.webp)
545545
546546
:::warn
547547
**Safe storage of tokens**
@@ -606,7 +606,7 @@ setupDiscordSdk().then(() => {
606606
607607
If you close and rejoin the Activity, you should now see the name of the current channel.
608608
609-
![Discord Activities](images/activities/tutorial-channel-name.png)
609+
![Discord Activities](images/activities/tutorial-channel-name.webp)
610610
611611
<Collapsible title="Step 6 Checkpoint" icon="list" open>
612612
@@ -680,7 +680,7 @@ setupDiscordSdk().then(() => {
680680
681681
If we relaunch our Activity, we will see the current server's avatar render in our Activity.
682682
683-
![Discord Activities](images/activities/tutorial-hero.png)
683+
![Discord Activities](images/activities/tutorial-hero.webp)
684684
685685
<Collapsible title="Step 7 Checkpoint" icon="list" open>
686686

docs/activities/design-patterns.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ When in an Activity with others, make the actions and presence of the others vis
4949
- If a user has customized their server nickname or avatar, use their server nickname or avatar in game.
5050
- Show when a user is speaking in the voice call, or whether they're active or inactive.
5151

52-
![Speech bubbles in Bobble League](images/activities/bobble-bash.png)
52+
![Speech bubbles in Bobble League](images/activities/bobble-bash.webp)
5353

5454

5555
### Respect user privacy
@@ -67,7 +67,7 @@ Make your app fast, easy to join, and maximize fun to launch a crowd favorite.
6767
- Surprise and delight is about caring about the small details of how a person experiences your work.
6868
- Put the right emotion in when they least expect it to deliver the magic.
6969

70-
![Bobble League](images/activities/bobble-league.png)
70+
![Bobble League](images/activities/bobble-league.webp)
7171

7272
### Keep load times as low as possible
7373
- This allows for easier drop-in drop-out behavior for the large portion of mobile users on Discord.
@@ -80,7 +80,7 @@ Make your app fast, easy to join, and maximize fun to launch a crowd favorite.
8080
- Activities are frictionless to join and easy to discover, so you can expect that users will join mid-experience. Give those users something to do, even if it's just letting them spectate until they can join without being disruptive. In the same vein, users can leave without notice or become afk (away from keyboard). Handle these cases gracefully.
8181
- Create a case for users who have joined a call but have not yet started playing or engaging. Allow these users to "spectate" other users who are playing. This can also be helpful for Activities that have an ideal number in mind for play.
8282

83-
![Support drop-in, drop-out behavior in your Activity](images/activities/eights.png)
83+
![Support drop-in, drop-out behavior in your Activity](images/activities/eights.webp)
8484

8585
### Make your app as available as possible
8686

@@ -105,7 +105,7 @@ Discord is a social platform where users talk to each other. Sharing and invites
105105
- Share photos or GIFs that capture moments of fun and memorable, or something to brag about. Don't make things shareable just to feature the activity.
106106
- Sharing a high score alone may not be very engaging, but sharing a really good move made in a game, or a collaborative drawing that creates a memory is a conversation starter and may make others want to join in on the fun.
107107

108-
![Shared Moment from Chess in the Park](images/activities/chess-victory.png)
108+
![Shared Moment from Chess in the Park](images/activities/chess-victory.webp)
109109

110110
#### Activities in Text Channels
111111
- The Activity user interface, copy and user flows should not rely on people in voice to explain, organize, clarify, or instruct about how the activity works.

docs/activities/development-guides/growth-and-referrals.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Deleting is irreversible and immediate. Ensure that your link isn't in active us
140140

141141
#### User Experience
142142

143-
![custom-link-embed](images/activities/custom-link-embed.png)
143+
![custom-link-embed](images/activities/custom-link-embed.webp)
144144

145145
Users will see an embed with your information displayed. Clicking "Play" opens the activity and passes through the `custom_id` you've set. A `referrer_id` will be present for links shared on Discord.
146146

docs/activities/development-guides/layout.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ discordSdk.commands.setOrientationLockState({
3434

3535
It's also possible to configure an application with a default orientation lock state via the Developer Portal. Using this method, the Discord app will apply the orientation lock when launching the application before the SDK has been initialized. This can create a smoother application launch flow where the application starts in the correct orientation rather than switching to the correct orientation after some delay after the application requests an orientation lock via the SDK. The Developer Portal supports setting a different default orientation lock states for phones versus tablets.
3636

37-
![default-orientation-lock-state](images/activities/default_orientation_lock_state.png)
37+
![default-orientation-lock-state](images/activities/default_orientation_lock_state.webp)
3838

3939
#### Subscribing to Screen Orientation Updates
4040

docs/activities/development-guides/local-development.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ https://funky-jogging-bunny.trycloudflare.com
4141

4242
In the Discord Developer Portal, update the Application URL mapping for `/` url to `funky-jogging-bunny.trycloudflare.com` to match your network tunnel address and save your changes.
4343

44-
![Configuring your URL Mapping](images/activities/url-mapping-tutorial.png)
44+
![Configuring your URL Mapping](images/activities/url-mapping-tutorial.webp)
4545

4646
:::warn
4747
If you do not own the URL that you are using to host the application (i.e. ngrok's free tier), someone else could claim that domain and host a malicious site in its place. Please be aware of these risks, and if you have to use a domain you do not own, be sure to reset your URL mapping when you are done using the tunnel.
@@ -59,7 +59,7 @@ The flow for setting up your production application is very similar:
5959
4. Follow the instructions for [Launching your Application from the Discord Client](/docs/activities/development-guides/local-development#launch-your-application-from-the-discord-client). Application URL Override should not be enabled.
6060

6161
This application now uses the same configuration it will use once it is fully published ✨.
62-
![application-test-mode-prod](images/activities/application-test-mode-prod.gif)
62+
![application-test-mode-prod](images/activities/application-test-mode-prod.webp)
6363

6464

6565
---
@@ -96,7 +96,7 @@ Because your application is "sandboxed", it will be unable to make network reque
9696

9797
To add or modify your application's URL mappings, click on `Activities -> URL Mappings` and set the prefix and target values for each mapping as needed.
9898

99-
![Configuring your URL Mapping](images/activities/url-mapping-tutorial.png)
99+
![Configuring your URL Mapping](images/activities/url-mapping-tutorial.webp)
100100

101101
#### Prefix/Target formatting rules
102102

@@ -111,7 +111,7 @@ To add or modify your application's URL mappings, click on `Activities -> URL Ma
111111
| ✅ DO | ❌ DON'T |
112112
|-------------------------------------------------------------|-----------------------------------------------------------------|
113113
| Requests mapped correctly | Requests to /foo/bar will incorrectly be sent to `foo.com` |
114-
| ![url-mapping-do.png](images/activities/url-mapping-do.png) | ![url-mapping-dont.png](images/activities/url-mapping-dont.png) |
114+
| ![url-mapping-do.png](images/activities/url-mapping-do.webp) | ![url-mapping-dont.png](images/activities/url-mapping-dont.webp) |
115115

116116
#### Exceptions
117117

@@ -161,7 +161,7 @@ The first section of Debug Logs are not your application logs but Discord specif
161161

162162
When you scroll down the page, your application logs should be visible.
163163

164-
![debug-logs-filtering](images/activities/debug-logs-filtering.gif)
164+
![debug-logs-filtering](images/activities/debug-logs-filtering.webp)
165165

166166
#### Sharing Application Logs from Mobile
167167

docs/activities/development-guides/mobile.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ By default, your Activity will be launchable on web/desktop. To enable or disabl
1515
- Select `Activities` -> `Settings` in the left-side of the developer portal, or visit `https://discord.com/developers/<your app id>/embedded/settings`
1616
- From check the appropriate checkboxes in the developer portal, and save your changes
1717

18-
![supported-platforms](images/activities/supported-platforms.png)
18+
![supported-platforms](images/activities/supported-platforms.webp)
1919

2020
---
2121

docs/activities/development-guides/multiplayer-experience.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sidebar_label: Multiplayer Experience
1010

1111
When a user clicks "Join Application", they expect to enter the same application that their friends are participating in. Whether the application is a shared drawing canvas, board game, collaborative playlist, or first-person shooter; the two users should have access to the same shared data. In this documentation, we refer to this shared data as an **application instance**.
1212

13-
![join-application](images/activities/join-application.png)
13+
![join-application](images/activities/join-application.webp)
1414

1515
The Embedded App SDK allows your app to talk bidirectionally with the Discord Client. The `instanceId` is necessary for your application, as well as Discord, to understand which unique instance of an application it is talking to.
1616

@@ -151,4 +151,4 @@ curl https://discord.com/api/applications/1215413995645968394/activity-instances
151151
With this API, the activity's backend can verify that a client is in fact in an instance of that activity before allowing the client to participate in any meaningful gameplay. How an activity implements "session verification" is left to the developer's discretion. The solution can be as granular as gating specific features or as binary as not returning the activity HTML except for valid sessions.
152152
153153
In the below flow diagram, we show how the server can deliver the activity website, only for valid users in a valid activity instance:
154-
![application-test-mode-prod](images/activities/activity-instance-validation.jpg)
154+
![application-test-mode-prod](images/activities/activity-instance-validation.webp)

docs/activities/development-guides/user-actions.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ discordSdk.commands.openExternalLink({
2525

2626
#### User Experience
2727

28-
![external-link-modal](images/activities/external-link-modal.png)
28+
![external-link-modal](images/activities/external-link-modal.webp)
2929

3030
Users will see a modal inside the Discord app notifying them whether or not they want to proceed. By clicking **_Trust this Domain_**, users will not see a modal for that specific domain again.
3131

@@ -60,7 +60,7 @@ try {
6060

6161
User Experience
6262

63-
![Invite Dialog UI](images/activities/invite-dialog.png)
63+
![Invite Dialog UI](images/activities/invite-dialog.webp)
6464

6565
Users will see a modal inside the Discord app allowing them to send an invite to a channel, friend, or copy an invite link to share manually.
6666

@@ -113,7 +113,7 @@ await discordSdk.commands.openShareMomentDialog({mediaUrl});
113113

114114
User Experience
115115

116-
![share-moment-dialog](images/activities/share-moment-dialog-example.png)
116+
![share-moment-dialog](images/activities/share-moment-dialog-example.webp)
117117

118118
---
119119

@@ -181,4 +181,4 @@ console.log(`Hardware Acceleration is ${enabled === true ? 'enabled' : 'disabled
181181

182182
#### User Experience
183183

184-
![encourage-hardware-acceleration-modal](images/activities/encourage-hardware-acceleration-modal.png)
184+
![encourage-hardware-acceleration-modal](images/activities/encourage-hardware-acceleration-modal.webp)

docs/activities/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_label: Overview
44

55
# Overview of Activities
66

7-
![Building Discord Activities](images/activities/activities-hero.png)
7+
![Building Discord Activities](images/activities/activities-hero.webp)
88

99
**Activities** are multiplayer games and social experiences that can be launched in Discord. Activities can integrate with Discord features like user identity, voice and chat, profile data like Rich Presence, and native monetization.
1010

0 commit comments

Comments
 (0)