Safari vs. WordPress 6.7 Block Editor: Who’s to blame for forced PNG-to-HEIC conversion?

Look at this image:


Now look at this one:


What if I told you those were the same image? Well… I mean… they’re not. Obviously. But they’re supposed to be. They were both the same image when they were on my computer. The same exact file. But I uploaded them to this page in two slightly different ways, and that made all the difference.

The one on top — the screwed-up one — I placed by inserting an Image block in the WordPress Block Editor, and then clicking the Upload button in that block, navigating my hard drive, and locating the image. The one on the bottom, I placed by again inserting an Image block, but this time I just dragged the image from a Finder window into the Safari window. WordPress supports drag-and-drop uploads.

Looking “under the hood,” I discovered that the file on top was somehow getting converted to Apple’s “High Efficiency Image Format,” HEIC (the reason for the C instead of an F is something I’ll leave to the Apple podcasters). WordPress just added HEIC support in version 6.7, which was released this week. Since browsers (other than Safari, I assume) can’t display HEIC images, WordPress automatically converts uploaded HEIC files to JPEG. And that’s why these two images look different. JPEG doesn’t support transparency, so the areas that were transparent in the original PNG got flooded with the nearest available colors1.

But, why should the results of these two upload processes be any different?

Well, after starting in the WordPress Support Forums and then moving over to the Make WordPress Core Trac and finally searching until I stumbled upon a year-old, barely active thread on the Apple Developer Forums, I discovered that Safari has a bug — I mean it has to be a bug, right? — where, if a file upload input field says it accepts HEIC format, Safari automatically converts the uploaded file to that format, apparently with no option not to do that. (I looked around all of the settings, even the developer ones, and didn’t see anything about this “feature” at all.)

And sure enough, WordPress 6.7 is a bit haphazard with its “support” of HEIC uploads, which made it easier to confirm the cause. There are two ways, generally speaking, that WordPress handles file uploads: the browser upload, via an <input type="file"> HTML field, and a JavaScript/AJAX/React/whatever drag-and-drop option.

The <input type="file"> field in the Image block of the Block Editor has added HEIC support via the accept="image/heic" attribute. But the input field in the old school Media Library upload page has not been similarly updated. (It’s become a fact of life in the WordPress world that most of the core team’s attention is on Block Editor stuff these days, and older features get ignored.) Uploading images in the Media Library does not do the conversion. Likewise, whatever exactly is going on with the drag-and-drop method also does not involve the accept="image/heic" attribute that causes Safari to do its mischief.

Unfortunately, it looks like the only “solution” at this point would be for WordPress to do a browser sniff and remove the accept="image/heic" attribute if the browser is Safari. The only reason that was explicitly added was to get Chrome to support HEIC uploads; as I understand it, Safari would support them regardless, but explicitly declaring HEIC support is apparently what triggers Safari to make the conversion.

So, practically speaking, Safari users who want to upload PNGs to their WordPress sites just need to be sure to only upload via drag-and-drop, or the Media Library.

(I haven’t tested, but I suspect JPEG uploads are likewise getting converted to HEIC and then back to JPEG, which probably results in a reduction of image quality.)


Side note on how I discovered this in the first place: Two days ago I was writing another blog post somewhat critical of Apple, and I found when I was trying to upload a screenshot of a window from my Mac — Mac screenshots are saved as transparent PNGs — the transparency was turning black. I was so driven to distraction over the situation that I barely managed to finish writing the post.

1 Saying those areas are flooded with color is an oversimplification. It looks like the color of each pixel is being determined consistently with how PNG compression works.

Is Apple ever going to properly address the inevitable, relentless growth of peoples Photos libraries?

I just got a new MacBook Pro with an M4 Pro chip, to replace my 3-year-old MacBook Pro with an M1 Pro chip. That older machine was fine, but, well… something in my gut just told me that if I was considering dropping two grand (minus some trade-in value) on a new computer manufactured in China, maybe I should do it before the end of 2024.

Anyway… I have the new MacBook Pro, and it’s pretty great. It’s essentially this year’s version of the same machine it’s replacing. The off-the-shelf model with a 14-inch display and a 512 GB SSD, at the same retail price. The upgrades are all in the Apple Silicon SoC: M4 Pro in place of the M1 Pro, with more cores and 50% more memory. A worthy upgrade to an already solid configuration.

I say “solid” because… well, I’d really like to have more disk space. I do a lot of video editing these days, and that requires a lot of storage. The problem is, Apple charges a ludicrous markup for increased disk capacity. And since external SSDs over Thunderbolt 5 are as fast as internal SSDs, I can get a 4 TB external disk for not much more than a meager 512 GB upgrade to Apple’s internal disk. The choice is obvious, even when weighing the convenience factor.

Which finally gets me (almost) to my point. Last night, after I had everything set up on the new Mac (I chose to manually install apps and copy files, so I could control what did and didn’t get moved over from the old Mac), I had over 300 GB of disk space free. This morning I sat down and was surprised to see I only had 180 GB free. What gives?

Well… what gives is the Photos app. I hadn’t even opened it — on purpose, for the exact reason I’m about to describe — but since I had logged into my iCloud account, the Mac “conveniently” automatically downloaded my entire Photos library from iCloud onto the Mac.

Do not want.

On my previous Mac, I had long since shuffled the Photos library off to an external disk. Honestly I never even really use Photos on my Mac, partly because my library is an unwieldy, 120 GB mess of close to 57,000 images1. But mostly because Apple gives users (almost) no control over how the files are managed on their Macs:

So, basically, you have three options:

  1. Fill up all of the space on your hard drive with your photo library.
  2. Fill up all of the space on your hard drive with your photo library, until your Mac decides you’re running out of space, then let it decide how much space to free up.
  3. Don’t have your photos on your Mac at all.

The default is #2, but it’s a pretty crappy option. Because for your Mac to know how much disk space to keep free, it needs to know how you intend to use it. If I’m not currently working on a video project, I don’t need much space. But if I am, then I can go from needing next to nothing to suddenly needing 200 GB or more of free space. Which means I always want to keep at least 200 GB free, in case I’m about to start on a video project. Once I’m rolling, I don’t want to be distracted with figuring out how to free up space.

Now here’s a twist: since, as I mentioned, external SSDs over Thunderbolt are essentially as fast as an internal SSD, you can easily edit a Final Cut project directly on an external disk. In fact, I do that a lot. But not always. I still want that free space.

Fortunately, Apple does provide a way to put your Photos library on an external disk. It’s easy and it works. But you shouldn’t have to do that.

The thing that really kills me is that it would be so simple for Apple to resolve this issue. All they’d need to do is add a slider to the settings tab from the screenshot above, letting the user set a minimum amount of disk space they want to keep free. Why doesn’t Apple do this? I feel like there’s a very intentional reason. And I think I’d be exasperated if I knew it.


1 Apple is really to blame for the mushrooming library, too. Their automatic tagging by date and location, and AI-assisted tagging of subjects like individual people, pets, etc., make it so easy to find specific images that there is no incentive to put any effort into culling the junk from your library. Growing libraries lead you to pay for larger iCloud storage allocations to hold them. There’s a reason “Services” is Apple’s fastest growing revenue segment. But all of that aside — whatever, I really am not bothered by it — the one place Apple is completely shitting the bed on all of this is handling on-device storage.

SMS texts not coming to your Mac? Mac sure you’re signed into the same Apple ID for both Messages and FaceTime on your iPhone. (Seriously.)

The subject line is the answer, but here’s the longer story.

I recently switched iPhones. Through a series of stupid errors, I ended up having to set it up as a totally new phone instead of transferring my old phone data over.

Ever since I did that, some conversations refused to sync between Messages on my iPhone and Messages on my Mac, even though they were both set up properly and various online tutorials didn’t help me solve the problem.

That last tutorial hung me up on one particular detail though. The Text Message Forwarding option was not appearing for me in the Messages settings on my iPhone.

I figured this was just, once again, an outdated tutorial that hadn’t caught up to changes Apple had made in the Settings app. But… those screenshots looked current. Hmm.

I don’t even remember exactly how I made this mental leap, but I found the solution not in anything to do with Messages, but rather with the FaceTime settings.

Due to the long and complicated history of Apple’s online services, I have two separate Apple IDs. One I use for App Store purchases, and a different one I use for iCloud.

Well… on both the Mac and the iPhone I had Messages logged into my iCloud account. But on my iPhone, I had FaceTime logged into my App Store account. And that’s why the Settings app wasn’t showing me Text Message Forwarding in the Messages settings.

I logged out of my App Store account for FaceTime and logged into my iCloud account, and suddenly the Text Message Forwarding option appeared under Messages. I turned on forwarding to my Mac and my iPad, and now everything is working!

The mysteries of Google Photos and what my videos are teaching its AI

For the past few years I’ve been shooting video, sometimes very long video, on my iPhone, and then transferring it to my Mac for editing.

I have two ways to get the videos to my Mac. I can use AirDrop for a direct device-to-device transfer. But the videos also automatically upload to iCloud in the background, so I can then open the Photos app on my Mac and find them there, and download them from “the cloud.”

Neither way is exceptionally fast, especially with large files, simply because they are large files, but they both have always worked seamlessly, and I can pretty much do them on-demand as soon as the videos are done recording.

Last night I recorded a performance of the big band I play in, using… gasp! …an Android phone. Specifically, a Google Pixel 3a. Yeah, it’s pretty old. But also new to me. I need an Android phone for testing my web development work, but since I don’t use it as my day-to-day phone, I didn’t want to spend a lot. I know the Pixel is a good phone, with a clean Android install, and the price was right ($150). Which is exactly why it’s the phone I chose to shoot the video with, because I was going to have to leave it unattended all night in a crowded auditorium, about 100 feet away from me. It was unlikely to be taken, but I didn’t want to risk it with my main iPhone or even a backup. (Plus, the Pixel actually does shoot pretty good video.)

Anyway… once I got home, I then had to contend with the problem I knew would be waiting for me. This is an Android phone, so there’s no iCloud. But I am also pretty heavily invested in the Google ecosystem, so I figured I’d have no issues transferring the videos to my Google Drive — or at least Google Photos — and get them that way.

There are issues.

First, I can’t find a way to just put them on my Google Drive, which is where I really wanted them. Yes, I can just jump over to photos.google.com instead of drive.google.com, without even having to log back in, but I operate frequently in Google Drive and I had never, before owning this phone, had any reason to even consider the existence of Google Photos. But, whatever.

Second, and I could be wrong about this, it seems like the files only transfer from the device to the cloud when you have the Photos app open on the phone. I have the phone running on my home wifi, which is connected to gigabit fiber, so the transfer should be about as fast as can be expected anywhere in the United States, but even though I left the app open for an extended period last night, it only uploaded one of the two videos. I gave up waiting on it and went to bed, and uploaded the second one this morning.

But here’s the real kicker: neither of the videos is “ready” yet in Google Photos, not even the one I uploaded last night. Maybe it hadn’t quite finished uploading then but still… what exactly is Google doing to get the videos “ready”? Why aren’t they “ready” the instant they’re uploaded?

I get that videos uploaded to YouTube need to go through some processing. YouTube does all kinds of crazy crap to videos. Some of it is transcoding and optimizing the files for streaming, which… yes. 100%. Please do that. Some of it is machine learning (a.k.a. “AI”) driven, analyzing the content to make smart chapters and such, as well as detecting content that is illegal or violates terms of use. I see the benefits. And some of it is for the benefit of corporate overlords, both at Alphabet and elsewhere, such as detecting copyrighted music. Well… honestly there are pros and cons to that. But it’s not the point of this post.

The point is, I get why that kind of processing is happening to YouTube videos. But none of it should be happening to private videos uploaded to your Google Photos account. I suppose I should give Google the benefit of the doubt and assume that it’s strictly doing the AI scans for illegal content. (I think you know the illegal content I am talking about so I am not going to spell it out.)

Apple’s recent efforts to implement technology to do on-device detection of that type of content recently got a lot of heat for its privacy implications — even though on-device scanning is far more private than in-the-cloud scanning. But Apple always takes the heat for things because it’s Apple, despite Google, Amazon and Facebook engaging in much more egregious versions of those things.

The thing about Google in particular is, they’re all about amassing TOTAL WORLD KNOWLEDGE. Not in an inherently nefarious way (although maybe there’s no way for that not to be inherently nefarious). But there are always nefarious implications in what they’re doing. So whatever is going on as I’m waiting for my videos to be “ready,” the one thing I know for sure is that Google’s AI is learning something from them.

Update: I realized after I posted this that maybe I should… uh… google it. Yes, Apple themselves have provided instructions on how to transfer photos and video from Android to Mac. I realized that I could maybe use this USB-C to USB-C cable I have sitting right here at my desk to make a file transfer!

Sometimes I wonder if anyone at Apple actually uses their products in the real world, episode #532,464: the iPhone QR Code Scanner app

QR codes are a convenient way to open a URL with your phone without having to type a long string of text (especially since it’s hard to avoid typos in a URL on a phone touchscreen).

But.

The iPhone’s QR Code Scanner app in the Control Center has a really annoying feature: It doesn’t open URLs in the Safari app; it opens them in its own embedded browser.

I’m not really sure why Apple chose to do this, or why they don’t realize what an issue it can create for users. What is that issue?

If you leave the app, when you go back to it, you’re back to the camera view for scanning a new QR code, rather than whatever web page you were interacting with.

There is no “history” in Code Scanner. No “back” button on the camera screen.

Sometimes this can be trivial. Sometimes not. Here’s a scenario I just went through that turned out not to be an issue, but it very well could have been.

It was time to renew the vehicle registration on my car with Minnesota Driver and Vehicle Services. (Yes, in most states we’re talking about the DMV, but since Minnesota always has to be different, here it’s DVS.) DVS is getting into the 21st century, and they’ve started emailing out the renewal notices instead of sending paper copies. And, the email included a QR code for me to jump-start the renewal process. Cool!

So, I scanned the code (off my Mac screen) with my iPhone, and started the process. (Maybe it’s possible for the Mac to read QR codes out of an on-screen PDF… I should investigate that.)

At the end of the process, since I was paying with my debit card, I got a pop-up alert from my bank’s app about the transaction. I would have ignored that, but I got two alerts from the bank. Worried I had double-submitted, I jumped over to the bank app. No, it was fine; the second charge was just the 2.15% credit card processing fee the DVS website had warned me about.

But now… oh no! I had been completing all of the process in the Code Scanner app, so the little “back” link at the top left of my iPhone screen took me back there, which of course forgot about that complex series of web form screens I had just stepped through, and blithely displayed the camera again for me to scan a new code. Damn! Was the process complete? Probably. I hope so. I opened up my email and saw a confirmation from DVS, so presumably everything was finished. But I won’t know for sure until I get my tabs in the mail. Ugh.

Now see, here’s the thing I keep forgetting in the moment. When you scan a QR code with Code Scanner, and that QR code is a web URL, Code Scanner opens the page in its own embedded browser. But there’s a little button at the bottom right to open the page in Safari.

If you have the foresight (or memory) to tap on that little Safari compass icon as soon as you’ve scanned a QR code, all will be well with the world. But if you’re just focused on whatever you’re trying to do with the web page you’ve just opened, it’s really easy to ignore the subtle interface differences between the two apps.

I shouldn’t have to play “Can you spot the differences?” like this is a kids’ placemat at a family restaurant in the 1980s. I shouldn’t have to remember to tap the Safari icon if I’m about to embark on a seven-part journey through the minds of the lowest-bid contractors who won the job to develop a government website.

Apple needs to understand how its products are used in the real world.