Multisite – Per Subsite Bucket and Custom Domain Settings
WP Offload Media can currently only be configured at the multisite network level and all subsites use the same bucket and CDN domain. We do plan to eventually allow per multisite subsite settings, but do not know when that might be yet.
However, if you’re happy to get your hands dirty you can get what you want by implementing a couple of our filters.
To change the target bucket during upload you can override the default “bucket” setting by implementing the “as3cf_setting_bucket” filter to return the bucket name you would like to use for the current subsite. If the bucket is in a different region to the default bucket make sure to also use the as3cf_setting_region
filter to change that.
Similarly, you can override the default “cloudfront” setting with the as3cf_setting_cloudfront
filter to change the domain used when filtering a Media Library URL for a visitor. So as long as you are using the “Custom Domain (CNAME)” setting you could return “cdn.siteone.com” or “cdn.sitetwo.com” depending on the current subsite. If you’re not using the “Custom Domain (CNAME)” setting by default then use the as3cf_setting_domain
filter to turn it on for the current subsite by returning “cloudfront”.
You can see all the settings keys and therefore their as3cf_setting_${key}
filter in the first section of our Settings Constants doc.