I’m going to start using Amazon S3′s CloudFront distribution service to better distribute and parralelize calls to images and such on my websites. However, since I use Joe Tan’s Amazon S3 for WordPress plugin, I couldn’t easily make use of CloudFront with WordPress uploads. So, as I usually do when I’m impatient, I altered the original code to not only allow for CloudFront, but if you supply multiple CNAMEs you assigned to your CloudFront distribution, it will randomize what hostname it returns when you add the image to your post!
Essentially I just added options for a CloudFront distribution hostname and then a spot for adding a CNAME (or multiple CNAMEs). When you upload your file, it should return a random CNAME for you, if any are entered.
Anyway, rather than paste all the diff code here, you can take a look at the diff file here. If you can’t figure it out, let me know and I’ll post the actual changed files. For me, it works as I’d hoped. Use at YOUR OWN RISK and, really, this is meant for people who are impatient like me and know at least how to code PHP a little. Hopefully Joe Tan will find this info useful and will update his plugin formally.
ON TWITTER
ON FACEBOOK