# How do I change the legacy CDN URLs of images in posts?

**URL:** <https://meta.discourse.org/t/how-do-i-change-the-legacy-cdn-urls-of-images-in-posts/97518>\
**Category:** Product Support\
**Created:** [19 september 2018 om 04:09 UTC](https://meta.discourse.org/t/how-do-i-change-the-legacy-cdn-urls-of-images-in-posts/97518 "2018-09-19T04:09:39Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![snakeninny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/snakeninny/32/115522_2.png) [@snakeninny](https://meta.discourse.org/u/snakeninny)\
**Post date:** [20 september 2018 om 02:44 UTC](https://meta.discourse.org/t/how-do-i-change-the-legacy-cdn-urls-of-images-in-posts/97518/9 "2018-09-20T02:44:51Z")

</div>

EDIT: after a whole night, `http://iosre.com/uploads/default/original/1X/735abc46bddabe584790cf2218d5d9bbc1f2501a.png` becomes `http://cdn.iosre.com/uploads/default/original/1X/735abc46bddabe584790cf2218d5d9bbc1f2501a.png`, so I guess it takes a while processing all URLs? I am checking more posts to double confirm.

I did rebuild after changing `DISCOURSE_CDN_URL` in `app.yml`.

I tried running `rake posts:rebake`, now all images with legacy URLs such as `http://7xibfi.com1.z0.glb.clouddn.com/uploads/default/original/1X/735abc46bddabe584790cf2218d5d9bbc1f2501a.png` become `http://iosre.com/uploads/default/original/1X/735abc46bddabe584790cf2218d5d9bbc1f2501a.png`, which is hosted right on the server instead of on the CDN.

What can I do to use new CDN host `cdn.iosre.com` for all legacy URLs?

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-change-the-legacy-cdn-urls-of-images-in-posts/97518)._
