• Using Jetpack’s Photon CDN to host images in custom WordPress themes

    Using Jetpack’s Photon CDN to host images in custom WordPress themes

    Photon is a great free image CDN that you can use with any self-hosted WordPress install via Automattic’s Jetpack suite of plugins. Photon uses wordpress.com’s infrastructure to host your site’s images on one of the fastest CDN globally.

    I highly recommend enabling it on every WordPress install. If your site is on cheap shared hosting, it will dramatically improve page load times. If you’re hosting a huge news site, it’ll save you loads of money.

    By default, Photon automagically serves any images embedded in or attached to a WordPress post or page. Including feature images, galleries, third-party sliders. Due to the nature of WordPress hooks and filters, it’s not possible for photon to grab images stored in post meta fields, or any images that are part of theme template files.

    I’ve written a gist that exposes Photon’s CDN wrapper as a simple function you can call in templates:

    Relevant Jetpack documentation. 


  • Trump

    Trump

    (This is not a political post. I don’t really do politics.)

    The vast majority of people I follow on the social medias are having a very predictable knee-jerk reaction against Donald Trumps presidential campaign. My knee-jerk reaction to predictable, like-button-induced, knee-jerk reactions is to immediately take a contrarian view.

    If I actually did politics, I’d continue this post by going on to describe that contrarian view. But, I’m not nearly well versed enough in US politics to make even the weakest coherent argument about why I think The Donald should be taken seriously.

    Instead, I’d like to recommend Episode 295 of Dan Carlin’s Common Sense podcast. He’s far from a pro-Donald guy, however he’s got a very unique take on the man, that every single bandwagon jumper needs to hear.

    Update, Dec 2015:

    At some point between August and now, Donald Trump became completely indefensible. I stand by my podcast recommendation and I still believe people are being too quick to gobble up everything the media is feeding them with regard to Trump. However I want the record to be clear, I certainly do not support Donald Trump for president of our fine neighbours to the south.


  • Historian for WP

    Historian for WP

    Today I relaunched my WordPress plugin (RetroPosts) with the more descriptive title: “Historian” and a pretty major feature, a sidebar widget!

    Historian is a plugin that gives you a glimpse into the past by surfacing your blog post’s from this week in history. I’ve been blogging on ohryan.ca for 7 years and every time I look at the plugin, I am reminded about a cool thing from the past. It’s really interesting to see of far the internet has come since I started this blog.

    For example, I couldn’t believe how terribad the first version of Instapaper was? I found this by reading one of my old posts. Based on the techcrunch post this was considered great app design back in 2008. Unbelievable.

    When I originally came up with the idea for Historian, I had thought it would just be a useful way to gain some inspiration from the past or follow up on a topic I hadn’t covered in a while.

    In reality, I think it could be really cool to let your visitors see what you’ve written in the past. I think it can add some credibility to your blog if you once were a more prolific blogger than you are today.

    You can see my historian in my sidebar right now.

    Try it out yourself on your blog →