StaticDelivr CDN

Description

StaticDelivr CDN is a lightweight and powerful plugin designed to improve your WordPress site’s performance. By rewriting theme, plugin, core file resource URLs, and optimizing images to use the StaticDelivr CDN, the plugin ensures faster loading times, reduced server load, and a better user experience.

StaticDelivr is a global content delivery network (CDN) that supports delivering assets from various platforms like npm, GitHub, and WordPress. By leveraging geographically distributed servers, StaticDelivr optimizes the delivery of your static assets such as CSS, JavaScript, images, and fonts.

Key Features

  • Automatic URL Rewriting: Automatically rewrites URLs of enqueued styles, scripts, and core files for themes, plugins, and WordPress itself to use the StaticDelivr CDN.
  • Image Optimization: Automatically optimizes images with compression and modern format conversion (WebP, AVIF). Turn 2MB images into 20KB without quality loss!
  • Automatic Fallback: If a CDN asset fails to load, the plugin automatically falls back to your origin server, ensuring your site never breaks.
  • Separate Controls: Enable or disable assets (CSS/JS) and image optimization independently.
  • Quality & Format Settings: Customize image compression quality and output format.
  • Compatibility: Works seamlessly with all WordPress themes and plugins that correctly enqueue their assets.
  • Improved Performance: Delivers assets from the StaticDelivr CDN for lightning-fast loading and enhanced user experience.
  • Multi-CDN Support: Leverages multiple CDNs to ensure optimal availability and performance.
  • Free and Open Source: Supports the open-source community by offering free access to a high-performance CDN.

Use of Third-Party Service

This plugin relies on the StaticDelivr CDN to deliver static assets, including WordPress themes, plugins, core files, and optimized images. The CDN uses the public WordPress SVN repository to fetch theme/plugin files and serves them through a globally distributed network for faster performance and reduced bandwidth costs.

How It Works

StaticDelivr CDN rewrites your WordPress asset URLs to deliver them through its high-performance network:

Assets (CSS & JavaScript)

  • Original URL: `https://example.com/wp-content/themes/theme-name/version/style.css`
  • Rewritten CDN URL: `https://cdn.staticdelivr.com/wp/themes/theme-name/version/style.css`

This process applies to themes, plugins, and core files:

  • Themes:
    Original: `https://example.com/wp-content/themes/twentytwentythree/1.0/style.css`
    CDN: `https://cdn.staticdelivr.com/wp/themes/twentytwentythree/1.0/style.css`

  • Plugins:
    Original: `https://example.com/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js`
    CDN: `https://cdn.staticdelivr.com/wp/plugins/woocommerce/tags/9.3.3/assets/js/frontend/woocommerce.min.js`

  • Core Files:
    Original: `https://example.com/wp-includes/js/jquery/jquery.min.js`
    CDN: `https://cdn.staticdelivr.com/wp/core/trunk/wp-includes/js/jquery/jquery.min.js`

Images

  • Original: `https://example.com/wp-content/uploads/2024/01/photo.jpg` (2MB)
  • Optimized CDN: `https://cdn.staticdelivr.com/img/images?url=https://example.com/wp-content/uploads/2024/01/photo.jpg&q=80&format=webp` (~20KB)

This ensures faster delivery through StaticDelivr’s globally distributed network.

Why Use StaticDelivr?

  • Global Distribution: StaticDelivr serves your assets from a globally distributed network, reducing latency and improving load times.
  • Massive Bandwidth Savings: Offload heavy image delivery to StaticDelivr. Optimized images can be 10-100x smaller!
  • Browser Caching Benefits: As an open-source CDN used by many sites, assets served by StaticDelivr are likely already cached in users’ browsers. This enables faster load times when visiting multiple sites using StaticDelivr.
  • Significant Bandwidth Savings: Reduces your site’s bandwidth usage and number of requests significantly by offloading asset delivery to StaticDelivr.
  • Optimized Performance: Ensures assets are delivered quickly, no matter where your users are located.
  • Comprehensive WordPress Support: Includes support for delivering core WordPress files (e.g., those in the `wp-includes` directory) to enhance site speed and reliability.
  • Support for Popular Platforms: Easily integrates with npm, GitHub, WordPress, and Google Fonts.
  • Minimal Configuration: Just enable the features you want and the plugin handles the rest.

License

This plugin is licensed under the GPLv2 or later. See License URI for details.

Installation

  1. Upload the plugin files to the `/wp-content/plugins/staticdelivr` directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Navigate to `Settings > StaticDelivr CDN` to enable the CDN functionality and configure image optimization.

FAQ

What does this plugin do?

This plugin rewrites the URLs of your WordPress themes, plugins, core files, and images to use the StaticDelivr CDN for serving static assets. It also optimizes images by compressing them and converting to modern formats like WebP.

How do I enable or disable the CDN rewriting?

Go to `Settings > StaticDelivr CDN` in your WordPress admin dashboard. You can independently enable/disable:
– Assets CDN (CSS & JavaScript)
– Image Optimization

How much can image optimization reduce file sizes?

Typically, unoptimized images can be reduced by 80-95%. A 2MB JPEG can become a 20-50KB WebP while maintaining visual quality.

What image formats are supported?

The plugin supports JPG, JPEG, PNG, GIF, WebP, AVIF, BMP, and TIFF. Images can be converted to WebP, AVIF, JPEG, or PNG.

Does this plugin support all themes and plugins?

Yes, the plugin works with all WordPress themes and plugins that enqueue their assets correctly using WordPress functions.

Will this plugin affect my site’s functionality?

No, the plugin only changes the source URLs of static assets. It does not affect any functionality of your site. Additionally, the plugin includes an automatic fallback mechanism that loads assets from your origin server if the CDN fails, ensuring your site always works.

Is StaticDelivr free to use?

Yes, StaticDelivr is a free, open-source CDN designed to support the open-source community.

Reviews

16 December 2025
I have been managing WordPress sites for a while now and I usually stay away from new CDN plugins because they tend to be a hassle to configure. I decided to give StaticDelivr a shot on a staging site first and honestly I am really impressed with how clean the implementation is. It is not just a basic wrapper. It handles the tricky stuff like URL rewriting for core files and themes automatically which is usually a pain to do manually with other free CDNs. The best part for me is the image optimization. It converts images to WebP and AVIF on the fly without needing a separate heavy plugin. I saw my homepage size drop significantly just by turning this on. Also huge props for including a fallback mechanism. If the CDN ever hangs it reverts to the local server so the site stays up. That is a critical feature for client work. If you want a lightweight and open source way to boost your Core Web Vitals without a monthly fee this is hands down the best option right now.
Read all 1 review

Contributors and Developers

“StaticDelivr CDN” is open source software. The following people have contributed to this plugin.

Contributors

Translate “StaticDelivr CDN” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Change Log

1.3.0

  • Redesigned settings page with modern card-based UI
  • Added “Settings” link on plugins list page for quick access
  • Both features (Assets CDN & Image Optimization) now enabled by default on fresh install
  • Added activation notice to guide new users
  • Interactive image quality slider with live preview
  • Status overview dashboard showing current configuration
  • Improved toggle UX – image options dim when disabled
  • Added plugin row meta links (Website, Support)
  • Better visual hierarchy and clearer explanations
  • Overall polish for a better user experience

1.2.1

  • Improved image fallback – now automatically extracts original URL from CDN URL when images fail to load
  • Fixed fallback for images blocked by Cloudflare or other security services
  • Enhanced srcset fallback support
  • Better error handling for edge cases

1.2.0

  • Added automatic image optimization – images are now compressed and converted to modern formats (WebP, AVIF)
  • Separate settings for Assets CDN (CSS/JS) and Image Optimization
  • Configurable image quality (1-100)
  • Selectable image output format (Auto, WebP, AVIF, JPEG, PNG)
  • Images include automatic fallback to origin server
  • Enhanced settings page with detailed explanations
  • Improved inline documentation

1.1.0

  • Added automatic fallback mechanism – if a CDN asset fails to load, the plugin automatically retries from your origin server
  • Improved reliability by injecting fallback script early in page head
  • Added console logging for debugging fallback events

1.0.0

  • Initial release.