# Issue: Virtual background hosted on AWS S3 is blocked by CORS policy

**URL:** <https://devforum.zoom.us/t/issue-virtual-background-hosted-on-aws-s3-is-blocked-by-cors-policy/141609>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [February 1, 2026, 2:32pm UTC](https://devforum.zoom.us/t/issue-virtual-background-hosted-on-aws-s3-is-blocked-by-cors-policy/141609 "2026-02-01T14:32:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergey77](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sergey77/32/50255_2.png) [@sergey77](https://devforum.zoom.us/u/sergey77)\
**Post date:** [February 1, 2026, 2:32pm UTC](https://devforum.zoom.us/t/issue-virtual-background-hosted-on-aws-s3-is-blocked-by-cors-policy/141609/1 "2026-02-01T14:32:07Z")

</div>

We’re trying to use a virtual background without SAB (enforceVirtualBackground: true).  
The image source for the virtual background is hosted on AWS S3:

```typescript
stream.startVideo({
  virtualBackground: {
    imageUrl: 'https://s3.us-west-2.amazonaws.com/...'
  }
})

```

However, we’re encountering an issue where using a virtual background image from AWS S3 does not work reliably. We receive the following error in the browser console:

> Access to image at ‘[https://s3.us-west-2.amazonaws.com/images.our-website.com/virtualBackground/7977045493521-x-970092064024272900-virtualBackground?dummy=1769954936174’](https://s3.us-west-2.amazonaws.com/images.our-website.com/virtualBackground/7977045493521-x-970092064024272900-virtualBackground?dummy=1769954936174%E2%80%99) from origin ‘[https://images.our-website.com](https://images.our-website.com)’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

> GET ``[https://s3.us-west-2.amazonaws.com/images.our-website.com/virtualBackground/7977045493521-x-970092064024272900-virtualBackground?dummy=1769954936174](https://s3.us-west-2.amazonaws.com/images.our-website.com/virtualBackground/7977045493521-x-970092064024272900-virtualBackground?dummy=1769954936174)  
> net::ERR\_FAILED

What we’ve tried so far

1. Initially, we used “[https://s3.us-west-2.amazonaws.com/](https://s3.us-west-2.amazonaws.com/)… “ directly as the image source.  
This resulted in a CORS error.

2. We then configured a Cloudflare proxy ([images.our-website.com](http://images.our-website.com)) in front of the S3 bucket.  
However, this did not resolve the issue.  
Even when loading the image through [images.our-website.com](http://images.our-website.com), we still receive the same error:

> “has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

Question:  
What is the recommended way to use images hosted on AWS S3 as virtual backgrounds without running into CORS issues?

Maybe you can help us with this, @vic.yang?

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

SharedArrayBuffer **is disabled** (enforceVirtualBackground: true)  
Zoom [Video SDK](https://developers.zoom.us/docs/video-sdk): 2.3.12  
React: 17.0.2

```javascript
await zmClient.init("en-US", `${window.location.origin}/lib`, {
    webEndpoint: window?.webEndpoint ?? "zoom.us",
    stayAwake: true,
    patchJsMedia: true,
    leaveOnPageUnload: true,
    enforceVirtualBackground: true,
    enforceMultipleVideos: {disableRenderLimits: true},
})

```

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [February 2, 2026, 2:19am UTC](https://devforum.zoom.us/t/issue-virtual-background-hosted-on-aws-s3-is-blocked-by-cors-policy/141609/2 "2026-02-02T02:19:03Z")

</div>

Hey @sergey77

Thanks for your feedback.

You can refer to the Amazon S3 documentation for guidance. Below is an example of a rule:

> **[Configuring cross-origin resource sharing (CORS) - Amazon Simple Storage Service](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enabling-cors-examples.html)**
>
> Enable cross-origin resource sharing by setting a CORS configuration on your bucket using the AWS Management Console, the REST API, or the AWS SDKs.

```json
{
  "CORSRules": [
    {
      "AllowedOrigins": ["*"],
      "AllowedMethods": ["GET", "HEAD"],
      "AllowedHeaders": ["*"],
      "ExposeHeaders": ["ETag"],
      "MaxAgeSeconds": 3600
    }
  ]
}

```

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![sergey77](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sergey77/32/50255_2.png) [@sergey77](https://devforum.zoom.us/u/sergey77)\
**Post date:** [February 8, 2026, 6:13pm UTC](https://devforum.zoom.us/t/issue-virtual-background-hosted-on-aws-s3-is-blocked-by-cors-policy/141609/3 "2026-02-08T18:13:12Z")

</div>

Hi @vic.yang ,

Unfortunately, the fix you recommended didn’t work for us. We also tried enabling “Bucket Owner Enforced” instead of “ACL”, but that didn’t resolve the CORS issue either.

The only approach that worked was downloading the image on our backend, converting it to Base64, and then using the Base64 string on the frontend instead of the AWS S3 link. This solution worked for us.

FYI, the CORS issue also occurs in:  
`// ZoomVideo.createLocalVideoTrack`  
`await localVideo.start(videoRef.current, { imageUrl });`
