Installing and Configuring the WordPress Plugin “Converter for Media” (with Cloudflare Integration)

Here is how to install the “Converter for Media" plugin, which improves site performance by converting WordPress media files into WebP or AVIF formats, and integrate it with Cloudflare. This article provides a detailed explanation of settings that leverage the Cloudflare API to properly manage CDN caching.

目次

Overview of Converter for Media

Converter for Media is a plugin that improves page load speeds by compressing WordPress images into lightweight formats (WebP and AVIF).

Benefits

  • Faster site speeds through image compression
  • Reduced effort with automatic conversion features
  • Support for WebP / AVIF conversion
  • Cache management through Cloudflare integration

Installing the Plugin

  1. Log in to your WordPress dashboard
  2. Go to “Plugins" > “Add New"
  3. Search for “Converter for Media"
  4. Click “Install Now" > “Activate"

Steps to Create a Cloudflare API Token

Converter for Media allows you to control the cache using the Cloudflare API. Follow the steps below to create an API token.

Creating an API Token

  1. Log in to the Cloudflare dashboard
  2. Select the target domain > Select “Get your API token" at the bottom right.
    Note that the Zone ID will be required for the Converter for Media plugin settings.
    Get API Token
  3. Select “Create Token"
  4. Select the WordPress template under user API tokens
    Select User API Token Template
  5. Rename the token to something recognizable and click “Create Token"
    Generate User API Token
  6. Create the token and copy the displayed API key
    User API Token
    *Note: If you forget the API key, you will need to recreate it.

Configuring Converter for Media (Cloudflare Integration)

  1. Go to WordPress “Settings" > “Converter for Media"
  2. Open the “CDN Settings" tab
  3. Enter the Zone ID from the Cloudflare token retrieval page into the Cloudflare Zone ID field, and enter the API token you just created into the Cloudflare API Token field
    Configuring Cloudflare API Token in Converter for Media
  4. Save settings

Web Server Configuration

If Rewrites do not work, configure your web server settings.

In OpenLiteSpeed, a restart is required after configuring the Converter for Media plugin.
Check here for other web servers.

5. Operation Check and Optimization

Running the Conversion

  • After configuring, run bulk image optimization at the bottom of the General Settings tab to verify that images in the media library have been converted to WebP/AVIF.
  • Measure page load speeds using Google PageSpeed Insights or GTmetrix.

Checking Cloudflare Cache

  • Check the cache status on the Cloudflare dashboard.
  • Verify whether changes are reflected using your browser’s developer tools.

6. Troubleshooting

  • Images are not converted: Review your image format settings.
  • Cache is not cleared: Re-verify the Cloudflare API token permissions.
  • Display glitches: Check your CDN settings, as image URLs may have changed.

Conclusion

By integrating Converter for Media with Cloudflare, you can automate image optimization and cache management, thereby boosting your WordPress site’s performance. Configure the Cloudflare API properly and aim for a smooth and fast site operation!