Sending Image Messages

Learn how to send image messages to customers via WhatsApp Business API. Includes format requirements, size limits, code examples, and best practices for delivering visual content.

Overview

This guide explains how to send image files to your customers via WhatsApp Business API. Images are a powerful way to share visual information like product photos, receipts, infographics, or promotional content.

Who this is for: Developers integrating WhatsApp messaging capabilities into their applications.

What you'll learn: How to format and send image messages, including format requirements, size limits, and messaging restrictions.


Before You Start

🔑

API Token Required

You need a valid API authentication token to use this endpoint. Learn how to obtain your token in the WhatsApp Business API authentication guide.


Understanding the 24-Hour Messaging Window

WhatsApp enforces a 24-hour messaging window for business-initiated conversations:

TimeframeWhat You Can Send
Within 24 hours of customer's last messageAny message type (text, images, videos, etc.)
After 24 hoursOnly pre-approved message templates
⚠️

Important Limitation

If you attempt to send an image message outside the 24-hour window, the API will return an error. Use message templates to reach customers after this window expires.


Supported Image Formats

Your image files must meet these requirements:

FormatMIME TypeTypical Use CaseMaximum Size
JPEGimage/jpegPhotos and general images5 MB
PNGimage/pngGraphics with transparency5 MB
WebPimage/webpOptimized for smaller file sizes5 MB

Best Practices

💡

Tips for Better Delivery

  • Optimize for mobile viewing – Most users will view images on mobile devices
  • Choose the right format:
    • JPEG for photographs
    • PNG for graphics with transparency
    • WebP for smaller file sizes and faster loading
  • Keep captions concise – Short, relevant descriptions work best
  • Test URLs before sending – Ensure image links are publicly accessible (no authentication required)
  • Stay under the size limit – Compress images to stay well below 5 MB for faster delivery

Common Errors

IssuePossible CauseSolution
Message rejected24-hour window expiredUse a message template instead
Image not deliveredURL not publicly accessibleCheck that the URL loads without authentication
Format errorUnsupported image formatUse JPEG, PNG, or WebP only
File size errorImage exceeds 5 MBCompress or resize the image

Related Resources

Language
Credentials
Header
Click Try It! to start a request and see the response here!