Skip to content
Account

CDN Media Middleware

Introduction

Default Uploader acts as middleware between the CDN and your application. This functionality allows you to optimize your files in the simplest way possible.

Setup

  1. Create a subdomain for your media files with your CDN provider and set the origin to api.defaultuploader.com.
  2. In your application, set the file address using the cdn subdomain.
  3. Configure default optimization settings for all files in your personal account.

The subdomain can be either a SECRET_KEY or another value that can be set in your personal account.

Example

// before
<img src="https://site.com" />
// after
<img src="https://cdn.site.com" />
// for example, if the default settings include [quality=75, format=auto]
The image has been optimized and converted to the optimal format for the browser making the request.