> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# uploadMarketingImage

> Upload an image for an SMS or email template. Redo checks the real file type, then resizes and compresses it with the same settings as the template editors, and returns a hosted URL. Each upload costs query points by size and also counts against a per-account upload quota; over the quota returns THROTTLED.

**Required scopes:** [`marketing_templates_write`](/docs/api-reference/v3/reference/scopes#scope-marketing_templates_write)

## Arguments

<ResponseField name="input" type={<a href="/docs/api-reference/v3/reference/marketing/upload-marketing-image-input">UploadMarketingImageInput!</a>} required>
  The image and the channel it is for.

  <Expandable title="fields" lazyRender>
    <ResponseField name="channel" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-channel">MarketingChannel!</a>} required>
      The channel the image is for. SMS accepts JPEG, PNG, and GIF and must end up at most 500 KB, resized toward a 1000px longest side. EMAIL also accepts WebP, at most 10 MB, resized toward 1200px wide. As in the editors, the original is kept when resizing would make the file larger.
    </ResponseField>

    <ResponseField name="source" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-image-source-input">MarketingImageSourceInput!</a>} required>
      The image file.

      <Expandable title="fields" lazyRender>
        <ResponseField name="base64" type="String">
          The file's bytes, base64-encoded. At most 10000000 bytes once decoded.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Returns

<ResponseField name="uploadMarketingImage" type={<a href="/docs/api-reference/v3/reference/marketing/uploaded-marketing-image">UploadedMarketingImage!</a>} required>
  An image hosted by Redo, ready to use as an SMS template image or an email image URL.

  <Expandable title="fields" lazyRender>
    <ResponseField name="contentType" type="String!" required>
      The MIME type of the stored file, which can differ from the upload's after compression.
    </ResponseField>

    <ResponseField name="height" type="Int!" required>
      The stored image's height in pixels.
    </ResponseField>

    <ResponseField name="sizeBytes" type="Int!" required>
      The stored file's size in bytes.
    </ResponseField>

    <ResponseField name="url" type="String!" required>
      The HTTPS URL of the hosted image. Pass it to `imageUrls` on an SMS template or `imageUrl` on an email section.
    </ResponseField>

    <ResponseField name="width" type="Int!" required>
      The stored image's width in pixels.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```graphql theme={null}
mutation {
  uploadMarketingImage(input: { ... }) {
    contentType
    height
    sizeBytes
    url
    width
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.