discourse/discourse — pull request #1228 by ZogStriP (2013-07-21 22:48:56+00:00)
Title: FIX: thumbnailing isn't working with CDN enabled

FIX: image thumbnailing isn't working when CDN is enabled.

The issue was that by the time we'd run the `CookedPostCreator` job, we'd have already prepended the cdn (`PrettyText.apply_cdn`) to all the assets in the cooked post. So we need to remove any cdn before trying to retrieve the corresponding upload from the databse (where urls are stored relatively).