ampproject / cloudflare-amp-optimizer

Implementation of AMP Optimizer for Cloudflare Workers
Apache License 2.0
22 stars 5 forks source link

Pass arbitrary options to the AMP optimizer. #3

Closed samouri closed 3 years ago

samouri commented 3 years ago

summary

We should be able to pass arbitrary options to AMP Optimizer within the config.js.

config.js

{
  "domain": "example.com",
  "optimizer": {
     "max-hero-images": 5, //  these get directly passed to the optimizer init config
   }
}

We then also need to update the README.

samouri commented 3 years ago

Completed via https://github.com/ampproject/cloudflare-amp-optimizer/pull/6