Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

CDN plugin for Koken


This repo is now archieved.

I am no longer a user of Koken and have migrated my Gallery to Yapawa, a gallery site that I developped.

Thank you Koken Team for your awesome tool that allowed me to host my pictures during many years.

This Koken plugin allows to use an alternate domain name for different asset types (images, scripts, stylesheets) and therefore route them through a CDN instead of serving them directly.

CDN requirement

The source for your CDN edges remains your website. Create an endpoint pointing to

Due to the way i.php is written, the CDN edges need to able to rewrite the host header and call your website with and not

If your CDN can't rewrite headers or force TTL's, your site needs to provide correct Cache-Control headers. Koken's default is to not cache scripts and stylesheets. An Apache and Nginx sample can be found inside the server folder.


Once installed, you need to define the alternate domain name to use. As long as the domain is not defined, the plugin will skip rewriting the URL's. By default all assets types are routed using the alternate domain name. You can disable depending on the type.


For CSS, Javascripts, Stylesheets and Icons, only relative links are rewritten to make use of the CDN. If you use the HTML Injector plugin, make sure to use relative links for your icons.

<link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160">


CDN plugin for Koken



No packages published