Using ShortPixel Image Optimizer with Cloudflare's API Token

ShortPixel Image Optimizer allows you to use the more secure Cloudflare API Token on its settings instead of the Global API Key and Cloudflare account e-mail:

This integration will allow ShortPixel update your images on Cloudflare as soon as they are optimized. This way, Cloudflare will never serve unoptimized images.

To create a Token that is suited for this, you need to grant it the "Cache Purge" permission. These are the steps to create it:

  1. On your Cloudflare account, go to My Profile on the top right:

  2. Select API Tokens in the top section menu and then press the Create Token button:

  3. Choose Custom Token (no need to select a template)

  4. Give the Token an internal name and select "Zone", "Cache Purge" and "Purge"/"Edit" in the three selectors below.

  5. Select a Specific Zone and chose your domain name:

  6. Press Continue to summary and then Create Token:

  7. Copy the Token displayed. Save it in a safe place because it's not going to be shown again!

  8. Use the token code on ShortPixel's settings. That's all! :-)

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us