Skip to main content

GIF Size Limits for Discord, Slack, X, and Gmail

Find the rule for the upload entry point, not just the platform name. A Discord attachment, a Slack emoji, an X post, and a Gmail message are different tasks. The official limits below are separate from this site's suggested compression targets.

CompressGIF team · Published:

Updated:

Prepare a GIF for your platform

Platform limits and recommended compression targets are different. Check the limit shown in your account before uploading.

Discord

Message attachment limits depend on your subscription and may vary during experiments.

  • Discord lists 20MB for free accounts, 50MB for Nitro Basic, and up to 1000MB for Nitro attachments. Check the limit displayed in your account.
  • Custom emoji must be smaller than 256KB and have separate permissions and image requirements.
  • The Discord compressor starts with a 1MB target for a smaller sharing file; Discord's upload limit is separate.
Slack

Custom emoji need a small file and a short animation; file size alone is not enough.

  • Slack recommends square images with transparent backgrounds and files under 128KB for custom emoji.
  • Animated GIF emoji can have up to 50 frames. Compression preserves frames; trim an unnecessary interval or re-export the source when the frame count is too high.
  • Your workspace may restrict who can add custom emoji. A smaller file will not change your permissions.
X / Twitter

The GIF upload allowance differs between mobile and the website.

  • X lists an animated GIF limit of 5MB on mobile and 15MB on the web.
  • These figures describe posting through X. Upload integrations have their own API requirements; do not assume one universal API limit from the mobile allowance.
  • X displays a GIF that plays only once and does not loop as a static image. Compression preserves loop information; viewer playback settings are another separate check.
Gmail

For personal Gmail accounts, the attachment allowance applies to the total attached to a message.

  • Personal Gmail accounts allow up to 25MB of attachments in one email. Add the sizes of all attached files, not just the GIF.
  • When attachments exceed the limit, Gmail uses a Google Drive link. Work and school accounts can have limits set by their administrator.
  • An attached GIF and an image placed in the message body are different presentation choices. Test the message in the email clients your recipients use.
WhatsApp

WhatsApp separates chat media, animated stickers, and document attachments with different size and format rules.

  • Custom animated stickers must be 512×512 pixels, at most 10 seconds long, and no larger than 500KB.
  • WhatsApp built-in video-to-GIF trims clips to under 6 seconds and re-compresses chat media automatically.
  • Sending a file as a Document supports up to 2GB without inline media re-compression, though it will not auto-play in chat.
Shopify

Shopify checks both file size in megabytes and pixel resolution in megapixels for product and theme images.

  • Uploaded product, collection, and theme images including GIFs cannot exceed 20MB or 25 megapixels (5000×5000 pixels).
  • A GIF smaller than 20MB can still be rejected if its dimensions exceed the megapixel limit.
  • For fast mobile storefront loading and Core Web Vitals, aim for 1–2MB per product GIF or convert long motion clips to WebP or MP4.
GitHub

GitHub caps drag-and-drop issue and PR GIF attachments separately from repository social preview images.

  • Images and GIFs attached to issues, pull requests, and comments are capped at 10MB.
  • Repository social preview images (PNG, JPG, or GIF) must be under 1MB; 1280×640 pixels is recommended.
  • Avoid committing large GIFs directly into Git history; compress README demos to 1–2MB and host them via issue/PR uploads or release assets.

Last verified:

Which rule applies to my upload?

Use the platform guidance above with this task comparison. Account settings and platform experiments can change what a particular upload accepts; the limit shown in the destination is the final practical check.

Upload entry pointWhat the rule measuresAdditional checkSuggested next step
Discord message attachmentAccount-based per-file allowance.Current account allowance and valid file.Use the Discord guide.
Discord custom emojiA smaller-than-256KB file rule.Emoji permissions and a recognizable small image.Crop, then compress below the cap.
Slack custom emojiRecommended under 128KB; at most 50 frames.Square shape, transparency, workspace permissions.Prepare the source, then try 100KB.
Ordinary X postMobile 5MB; web 15MB.Loop behavior and upload client.Check the client, then actual bytes.
Personal Gmail messageUp to 25MB across attachments.Other attached files and delivery method.Add all file sizes before sending.
Work or school GmailAdministrator-defined limits.Workspace policy and recipient access.Check the applicable account rule.

Why are recommended targets smaller than the limits?

A target such as 100KB or 1MB is a practical starting point, not an official platform rule. A lighter file can leave room for other attachments or make a small visual easier to share.

Do not use a recommendation to overwrite the actual limit, and do not treat an official maximum as a reason to make a file that large. Preserve the detail needed for the task.

What else can reject a GIF that is small enough?

A file can meet its byte budget but exceed a frame requirement, lack a useful loop, or be sent through an account that lacks permission. These are separate checks.

CheckExampleCan compression alone fix it?
FramesSlack custom emoji over 50 frames.No; trim or re-export the source.
LoopingA single-play GIF displayed as static on X.No; prepare a looping source.
PermissionsA restricted custom-emoji upload.No; check workspace or server access.
Combined attachmentsAn email containing a GIF and large documents.Only if reducing the GIF makes the combined total fit.

Where can I check the platform-specific steps?

The dedicated guides explain the upload choices and practical preparation. Their official source links and verification date show which guidance the comparison uses; platform rules can change after that date.

Compress a GIF