{"id":15524962,"url":"https://github.com/ericmann/dynamic-cdn","last_synced_at":"2025-04-23T07:51:28.361Z","repository":{"id":14512523,"uuid":"17226205","full_name":"ericmann/dynamic-cdn","owner":"ericmann","description":"Dynamic CDN for front-end assets","archived":false,"fork":false,"pushed_at":"2018-04-30T23:03:27.000Z","size":65,"stargazers_count":36,"open_issues_count":2,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T22:51:19.136Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-26T21:35:53.000Z","updated_at":"2023-11-28T09:32:10.000Z","dependencies_parsed_at":"2022-08-27T07:51:21.710Z","dependency_job_id":null,"html_url":"https://github.com/ericmann/dynamic-cdn","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Fdynamic-cdn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Fdynamic-cdn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Fdynamic-cdn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmann%2Fdynamic-cdn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericmann","download_url":"https://codeload.github.com/ericmann/dynamic-cdn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250395105,"owners_count":21423375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:53:38.800Z","updated_at":"2025-04-23T07:51:28.333Z","avatar_url":"https://github.com/ericmann.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic CDN # [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url]\n\n**Contributors:**      [ericmann](https://profiles.wordpress.org/ericmann), [10up](https://profiles.wordpress.org/10up)  \n**Donate link:**       https://eamann.com\n**Tags:**              CDN, images, performance  \n**Requires at least:** 3.8.1  \n**Tested up to:**      4.5.2  \n**Stable tag:**        0.4.0  \n**License:**           GPLv2 or later  \n**License URI:**       https://github.com/ericmann/dynamic-cdn/blob/master/LICENSE.md\n\nDynamic CDN for front-end assets.\n\n## Description ##\n\nDynamic solution for rewriting image asset URLs to a hosted content delivery network (CDN) with optional domain sharding for concurrent downloads.\n\nThis plugin is based heavily on the CDN dropin from Mark Jaquith's WP_Stack (https://github.com/markjaquith/WP-Stack).\n\n## Installation ##\n\n### Manual Installation ###\n\n1. Upload the entire `/dynamic-cdn` directory to the `/wp-content/plugins/` directory.\n2. Activate Dynamic CDN through the 'Plugins' menu in WordPress.\n\n## Frequently Asked Questions ##\n\n### Will this work as a mu-plugin? ###\n\nYes.  The plugin, as designed, will work just fine in the mu-plugins directory.  We highly recommend a second mu-plugin be added to configure the CDN domains used by the system.\n\n### How do I add a domain? ###\n\nIn a function wired to `dynamic_cdn_first_loaded`, you'll reference the `-\u003eadd_domain()` method of the `Dynamic_CDN` object.  For example:\n\n    function my_cdn_domains() {\n        $manager = DomainManager::last();\n        $manager-\u003eadd( 'cdn0.mydomain.com' );\n        $manager-\u003eadd( 'cdn1.mydomain.com' );\n        $manager-\u003eadd( 'cdn2.mydomain.com' );\n    }\n    add_action( 'dynamic_cdn_first_loaded', 'my_cdn_domains' );\n\n### What if I want to add my domains through wp-config.php? ###\n\nSimply define a DYNCDN_DOMAINS constant that's a comma-delimited list of your cdn domains.  For example:\n\n    define( 'DYNCDN_DOMAINS', 'cdn0.mydomain.com,cdn1.mydomain.com,cdn2.mydomain.com' );\n\n### What if I don't add any domains, will this break my images? ###\n\nHopefully not.  If you haven't added any domains the plugin will not rewrite anything, bypassing your images entirely.\n\n## Screenshots ##\n\nNone at this time.\n\n## Changelog ##\n\n### 0.4.0 ###\n* New: Unit tests for core functionality\n* Fix: Ensure srcsets don't filter in admin views\n\n### 0.3.0 ###\n* New: Add support for WordPress 4.4 srcsets\n\n### 0.2.0 ###\n* New: CDN domains can be added with a constant.\n* Fix: Make domain mapping multisite aware. props @trepmal\n\n### 0.1.0 ###\n* First release\n\n## Upgrade Notice ##\n\n### 0.4.0 ###\nDomain management has moved from a general-purpose class to a purpose-built `DomainManager` object. This object is\ninstantiated with your current site's domain name, and can be accessed throught the static `DomainManager::last()` helper.\n(This method automatically returns the last-instantiated domain manager). If you weren't manipulating CdN domains\nprogrammatically, you won't need to change anything at all.\n\n### 0.1.0 ###\nFirst Release\n\n[travis-image]: https://travis-ci.org/ericmann/dynamic-cdn.svg?branch=master\n[travis-url]: https://travis-ci.org/ericmann/dynamic-cdn\n[coveralls-image]: https://coveralls.io/repos/ericmann/dynamic-cdn/badge.svg?branch=master\u0026service=github\n[coveralls-url]: https://coveralls.io/github/ericmann/dynamic-cdn?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmann%2Fdynamic-cdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericmann%2Fdynamic-cdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmann%2Fdynamic-cdn/lists"}