Title: REST API urls
Last modified: September 12, 2017

---

# REST API urls

 *  Resolved [wtframework](https://wordpress.org/support/users/wtframework/)
 * (@wtframework)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/rest-api-urls/)
 * I am just wondering what I can do with regards to the WordPress rest API and 
   pulling URLs from there?
    I have images that will still pull in the full url 
   and not the CDN url. Is there a way to pass through a filter to update to KeyCDN
   urls?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [codyarsenault](https://wordpress.org/support/users/codyarsenault/)
 * (@codyarsenault)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/rest-api-urls/#post-9490418)
 * I’m assuming your image links are hard-coded directly in your JSON file? Currently,
   CDN Enabler is unable to replace those types of links. However, I’ll make note
   of this with the dev team.
 *  Thread Starter [wtframework](https://wordpress.org/support/users/wtframework/)
 * (@wtframework)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/rest-api-urls/#post-9490535)
 * Is there any way to do this currently? I was thinking of having the theme check
   for you plugin and use the filter you use but not on template_redirect. Im happy
   to create a solution for myself to get it working then integrate it into the 
   plugin (no charge of course!)
 *  Thread Starter [wtframework](https://wordpress.org/support/users/wtframework/)
 * (@wtframework)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/rest-api-urls/#post-9490568)
 * sorry I realise I did not answer your question, it is a front end SPA, I pull
   all the urls from wordpress using:
 * add_action( ‘rest_api_init’, function () {
    register_rest_route( ‘myplugin/v1’,‘/
   author/(?P<id>\d+)’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘my_awesome_func’,));});
 * (thats example above not actual code)
 *  [codyarsenault](https://wordpress.org/support/users/codyarsenault/)
 * (@codyarsenault)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/rest-api-urls/#post-9490659)
 * There currently isn’t a way to achieve this however you can certainly open a 
   pull request on GitHub if you achieve a solution and would like to contribute.
   [https://github.com/keycdn/cdn-enabler](https://github.com/keycdn/cdn-enabler)
    -  This reply was modified 8 years, 9 months ago by [codyarsenault](https://wordpress.org/support/users/codyarsenault/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘REST API urls’ is closed to new replies.

 * ![](https://ps.w.org/cdn-enabler/assets/icon-256x256.png?rev=2472538)
 * [CDN Enabler](https://wordpress.org/plugins/cdn-enabler/)
 * [Support Threads](https://wordpress.org/support/plugin/cdn-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/cdn-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cdn-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cdn-enabler/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [codyarsenault](https://wordpress.org/support/users/codyarsenault/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/rest-api-urls/#post-9490659)
 * Status: resolved