Optimizing Images With TinyPNG and Workflow

Whenever I include images or screenshots within the body of a blog post, I resize them so they aren’t unnecessarily large. iPad Pro screenshots, for instance, are 2732x2048px and often larger than 1MB. There’s no need to share these images full-size, so I reduce their dimensions to something like 1024x960px. This usually gets the file size down to around 200KB.

Back when I used a Mac to write blog posts, I would have also taken the step of optimizing the images using ImageOptim. This app uses clever compression techniques to reduce the file size while preserving quality. It was a simple drag-and-drop process that could drastically reduce the file size further. I haven’t yet found an equivalent iOS app that does something similar, so image optimization isn’t something I’ve been doing.

However, there are web services that perform image optimization. One such service, TinyPNG, has an API that can receive images and return a URL to an optimized version. Using Workflow’s recent API support, I’ve created this workflow that both resizes and optimizes JPG or PNG images using the TinyPNG API. When the action extension workflow is run, there’s an option to resize the image (using Workflow’s built-in image resize action), after which it’s uploaded to TinyPNG for optimization. An alert displays the difference in file size before the optimized image is downloaded. TinyPNG uses randomly-generated filenames, so you’re asked by the workflow to specify a new one.

The following PNG screenshot, resized to 1024x960px, was originally 202KB. After optimization, it’s just 57KB.

TinyPNG is free to use if you’re optimizing up to 500 images per month, which is plenty for most bloggers. As with most API services, you need an API key to use TinyPNG (the workflow has an import question that prompts for this).

Before you start optimizing images, keep in mind that TinyPNG is a web service and you’re uploading images to a third-party. It’s entirely up to you about what images you feel comfortable optimizing. I’m happy to use this for any public images and screenshots I’d share on my blog anyway, though I wouldn’t use it to optimize images that contain sensitive information (scans of passports, screenshots of bank account details, etc.).

Customize Spotlight Results

Spotlight offers a great way to search for almost anything on iOS device, with results from both Apple and third-party apps. If you have a lot of apps and are finding that search results are a bit too cluttered, you can exclude some of them from appearing in the results.

  • Open Settings
  • Tap General > Spotlight Search
  • Tap each of the search results to toggle their visibility

As you go through the list of apps that Spotlight can search in, keep in mind that not all apps necessarily have content that is searchable. Even if an app is listed, it’s still up to the developer to support Spotlight. To make things easier, only turn off apps that you know are showing results that you don’t want to include–some apps may be enabled but don’t have content that is searchable.

Domain Redirection Using DNSimple

Until 2015, my blog was at sparsebundle.net. I eventually decided to change where my blog was located, so I moved it over to jordanmerrick.com, making sure to keep the URL structure the same.

I used to host jordanmerrick.com on a fairly standard web server at DigitalOcean. This server had an additional host configured for the sparsebundle.net domain which simply redirected any sparsebundle.net links to the equivalent jordanmerrick.com version. Nowadays, I use a git-based workflow and host the site with Netlify, so redirecting sparsebundle.net links is done differently.

I use DNSimple to manage the DNS records of my domains. The service offers a useful URL record that redirect entire domains from one to another while retaining the URL path. Anyone trying to find an old sparsebundle.net blog post are redirected to the post located here. It’s a really simple solution to something that is often more complex than it feels it needs to be.

The redirect functionality doesn’t work to, or from, HTTPS URLs, though sparsebundle.net never used SSL in the first place. Although jordanmerrick.com does use SSL, any non-HTTPS links are gracefully redirected to HTTPS by Netlify.

Workflow Introduces Magic Variables

Federico Viticci:

With today’s 1.7 update, the Workflow team isn’t introducing Instant Variables. Instead, they’ve rebuilt the engine behind variables on a new system called Magic Variables, which completely reimagines how you can create workflows and connect actions for even more powerful automations.

More than a mere tweak for power users, Magic Variables are the next step in Workflow’s goal to enable everyone to automate their iOS devices. By making workflows easier to create and read, Magic Variables are the app’s most important transformation to date, and the result far exceeds my expectations.

Federico isn’t exaggerating when he says this is a significant update to Workflow. Magic Variables fundamentally changes how workflows are created, making them both easier to build and much more powerful.

Make the Most of the Up Next queue in Music

Up Next is a feature of Music that allows you to queue up songs to play next. It’s a great way to ensure you have a steady stream of music to listen to without interruption.

You can find the Up Next queue by swiping up on the Now Playing screen in Music. All the songs currently in the Up Next queue are then displayed. You can drag any of the songs in Up Next to re-order them.

Should you select a song that is part of an album, any remaining tracks are added to Up Next automatically. For instance, you can just start playing the first track of an album and Music automatically queues up the rest of the album for you.

Adding music to Up Next

There are a few different ways to bring up the Music options pane to add any songs, albums, or playlists to Up Next.

  • When viewing an album or playlist, tap the More button
  • If you’re using an iPhone with 3D Touch, you can also press down on the item
  • For other devices, you can also tap and hold to bring up the Music options

There are two options for adding music to Up Next:

  • Play Later: Adds the music to the end of the Up Next queue
  • Play Next: Adds the music to the top of the Up Next queue. This music is played next, then the queue continues with previously added music.

If you just want to add to your Up Next queue and continue listening to the queue in its current order, use Play Later. If you want to listen to a particular song or album immediately after the currently-playing song has finished, use Play Next. Keep in mind that if you’re listening to a particular album or playlist, anything you add using Play Next is played immediately after the song has finished. If you like to listen to complete albums, you won’t want to use this as often.

If you’ve added a selection of music to the Up Next queue and then try to play a different song entirely, a message appears that asks if you want to keep, or clear, the Up Next queue.

Archiving Messages in Mail

The majority of email providers offer so much storage capacity that it’s often unnecessary to delete messages purely to save space. Instead of sending messages to the trash, Mail can be set up to archive messages. Managing emails is basically the same, but instead of deleting a message, it’s moved to a separate archive folder.

  • Open Settings
  • Tap Mail > Account
  • Tap on an email account that you would like to enable archiving on
  • Tap Advanced and change the option for “Move Discarded Messages Into:” to Archive Mailbox

In Mail, any action that would previously delete a message now archives it within an “Archive” folder instead. If you still want to delete a message, tap and hold the Archive button when viewing a message brings up a secondary menu.

Quickly Access Authenticator Codes in 1Password on Your Apple Watch

Many online services offer two-factor authentication (also known as two-step verification) as an additional layer of security that helps protects your account. 1Password can be used as an authenticator app that generates six-digit codes for services that make use of one-time passwords.

Instead of opening or switching to 1Password on your iPhone or iPad whenever you need a verification code, the 1Password app for Apple Watch keeps them within easy reach.

  1. Open 1Password
  2. Choose a login that has a one-time password
  3. Tap Add to Apple Watch

Your login now appears within the 1Password Apple Watch app and displays a verification code that refreshes every 30 seconds.

For easy access, keep 1Password located within your Apple Watch’s dock. To do this:

  1. Open 1Password on Apple Watch
  2. Press the side button to show the Dock
  3. Swipe up on 1Password and tap Keep in Dock

Now, your verification codes are always available just by pressing the side button and selecting the 1Password app.