Image Titler 1.4.1 Features Borders

Image Titler 1.4.1 Featured Borders

As many of you probably know, I generate all my featured images using a Python script that I wrote for the job. That script is called Image Titler, and I just released version 1.4.1 which features bordersOpens in a new tab..

Table of Contents

Inspiration for the Change

As it turns out, my membership site hasn’t exactly blown up over the last couple months, but I have been steadily gaining membership. At this point, I’m closing in on 60 members—most of which are free.

Every once in awhile, one of my members will critique the site. For instance, one of my members recently shared the following feedback:

The “Members” tab shows both “Account” and “Login” no matter if you’re logged in or not (And no “log out”). And if you can’t see a page it just shows “You are unauthorized to view this page.” in small text where the content would be, without telling you if it’s because you’re not logged in, or don’t have a subscription.

Since then, I’ve fixed all of these problems. But, there were more:

There’s also no easy way of seeing if an blog post is free or not. If I go Members.Account > Subscriptions > Basic it sends me to /tag/free which lets me filter the free ones, but I don’t see a way of getting there from the blog itself. Nor are the tags visible in the blog post list.

That last bit of feedback prompted me to think up a way to make it more clear which posts were free and which weren’t. Unfortunately, I don’t really want to play around with PHP and the theme files, so I opted for something I could control: featured images.

Image Borders

Now, when you go to the blog archive, you should see that the featured images are a little different than usual. Instead of the typical two red rectangles and the white title, now you’ll see a colored border around each rectangle.

The colored borders come in two forms: gold and silver. The gold borders indicate premium content while silver borders indicate free content. A featured image without a border just indicates public content.

These borders are accomplished using a pillow 6.0.0 feature which allows you to set and outline on a rectangle with some width. The code I use looks something like the following:

draw.rectangle(
        (
            (IMAGE_WIDTH - width - X_OFFSET * 2, position),
            (IMAGE_WIDTH, position + RECTANGLE_HEIGHT)
        ),
        fill=RECTANGLE_FILL,
        outline=TIER_MAP.get(tier.lower(), None),
        width=7
    )

If you’d like to try out this new feature, get the latest version of the Image Titler and run the following commands:

image_titler --tier free # Adds a silver border
image_titler --tier premium # Adds a golder border

Naturally, it’s going to take time to roll out this change for all of my blog posts. At the time of writing, I had 73 of them, so changes could take awhile. For now, I’m going to start with the latest posts and work my way backwards. Hopefully, by the time this is published, all of the posts are updated.

Feedback

In addition to the border changes, I’ve also added more links to the free and premium content, so hopefully you have an easier time navigating the site. If not, let me know! I’m happy to have the feedback. If everything looks good, then that’s great! I love when my job is easy.

Image Titler News (9 Articles)—Series Navigation

For the uninitiated, the Image Titler is a tool for generating thumbnails with titles on them. Over time, I’ve expanded the tool to include quality of life features like the ability to change image size or place a logo. This series helps document those changes.

Jeremy Grifski

Jeremy grew up in a small town where he enjoyed playing soccer and video games, practicing taekwondo, and trading Pokémon cards. Once out of the nest, he pursued a Bachelors in Computer Engineering with a minor in Game Design. After college, he spent about two years writing software for a major engineering company. Then, he earned a master's in Computer Science and Engineering. Today, he pursues a PhD in Engineering Education in order to ultimately land a teaching gig. In his spare time, Jeremy enjoys spending time with his wife, playing Overwatch and Phantasy Star Online 2, practicing trombone, watching Penguins hockey, and traveling the world.

Recent Posts