Assets (Deprecated): Enable Gzip Compression in CloudFront and MaxCDN

PLEASE NOTE: The Assets addon does not work with WP Offload Media 2.0 or later, please use the Assets Pull addon instead.

If your CDN supports automatic compression, you should disable the Gzip option within WP Offload Media and enable it within your CDN control panel. This will improve compatibility with very old browsers by honoring the Accept-Encoding header. In some cases it will also improve server performance, as compressing assets can be CPU intensive.


Log into the AWS console and open your CloudFront distribution settings. Navigate to the Behaviours tab and edit the behaviour which points to your S3 bucket.


Enable the option ’Compress Objects Automatically’ and save the settings.


Your distribution will begin to replicate the new settings to all existing edge locations, which can take a while to complete. Once the ‘State’ column updates to ‘Enabled’ the changes have replicated and gzipped content will begin to be served.



Log into the MaxCDN control panel and navigate to your pull zone.


Open the settings tab and check the option ‘Serve compressed files’. Save your settings for the changes to take effect.


Once your new settings have replicated across all edge locations compressed content will begin to be served.