If images display correctly on your website but appear broken in newsletters or emails, then this might be due to Assets CDN rewriting the image URLs used by your email plugin.

In this guide, we will explain why the same image can use different URLs on your website and in an email, how to test the rewritten CDN URL, and what to change if your CDN cannot serve the image.

How Assets CDN Rewrites Image URLs

Assets CDN rewrites supported static asset URLs so they use your configured CDN hostname.

The CDN must then be able to retrieve and serve the requested file from your origin server. If the CDN cannot serve that file, the rewritten URL can result in a broken image.

The RunCache dashboard on the Assets CDN tab, with a Disabled pill on the right. Under the heading Choose a CDN provider it reads: Enable one provider at a time to rewrite your static asset URLs through a CDN. Two cards sit below, BunnyCDN and Custom CDN, each with an off toggle.

In RunCache, you can use the assets CDN rewrites to serve static asset URLs through two different CDN providers.

The Choose a CDN provider block from the Assets CDN tab. Under the line 'Enable one provider at a time to rewrite your static asset URLs through a CDN' sit two cards, each with a grey off toggle: BunnyCDN, described as accelerating media file delivery using BunnyCDN's global network, and Custom CDN, described as bringing your own CDN hostname and letting RunCache rewrite asset URLs to it.

RunCache can encounter the same image URL in different WordPress contexts.

Some image URLs are rewritten based on the file extension, while attachment URLs under wp-content can be rewritten without applying the same extension check. This can cause the same image to use different URLs depending on how another plugin retrieves it.

By default, Assets CDN rewrites the following file extensions: jpg , jpeg , png , gif , ico , mp4 , css , js , svg , woff , woff2 , ttf , and eot .WebP and AVIF are not included in the default list of allowed extensions.

Why Website and Newsletter Image URLs Can Differ

A WebP image can be handled differently depending on how WordPress or another plugin retrieves its URL.

For example, the image may retain its original site URL when it appears in post content, whereas a newsletter plugin retrieving the same image as an attachment may receive a CDN URL.

If the CDN cannot serve the WebP file, the image can therefore work correctly on the website but fail in the email.

A preview generated in the WordPress admin area may not use the same image URL as an email generated during a scheduled send.

When testing this issue, send a real test email rather than relying only on the admin preview.

Troubleshoot Broken Newsletter Images

Start by copying the broken image URL from a delivered email.

If you have command-line access, you can test the URL with curl. You can also open the URL directly in a browser.

  1. Test the image URL from the delivered email.

    Open the URL directly in a browser or run:
curl -s -o /dev/null -D - https://cdn.example.com/wp-content/uploads/2026/06/image.webp

A working CDN URL should return an HTTP 200 response with an image content type, for example:

HTTP/1.1 200 OK
Content-Type: image/webp

If the request returns an error, use the HTTP status to help identify the problem.

  • 404 Not Found can indicate that the CDN cannot retrieve the file from the origin.
  • 403 Forbidden can indicate that the CDN is refusing to serve the requested file.

Check the CDN configuration before changing the RunCache rewrite settings.

  1. Check that your CDN can serve the image format.

    If the broken images use WebP or AVIF, confirm that your CDN is configured to retrieve and serve those formats from the origin.
  2. Temporarily disable Assets CDN if you need to restore working newsletter images while you troubleshoot the CDN configuration. Go to RunCache → Dashboard → Assets CDN and disable the active CDN provider.

    Or, with WP-CLI, run:
wp runcache disable-cdn
Disable CDN
  1. After disabling Assets CDN, purge the page cache so previously cached HTML no longer references the CDN hostname:
wp runcache purge

If cached pages still contain the previous CDN hostname, image URLs can remain broken after Assets CDN is disabled. Purging the page cache removes those cached references.

  1. Do not add WebP or AVIF to the allowed extension list until you have confirmed that your CDN can serve those formats correctly.

    Adding an extension causes more URLs using that file type to be rewritten through the CDN. It does not fix a CDN that cannot serve the file.

Assets CDN Rewrite Limitations

Assets CDN does not provide separate controls for excluding an individual plugin, request context, or file from URL rewriting.

The available controls are the CDN provider or hostname, the allowed file extensions, and whether Assets CDN is enabled.

Changing the CDN hostname or enabling or disabling Assets CDN automatically purges the page cache.

If you change related settings outside the RunCache interface, manually purge the page cache afterward.