MassLinkOpener - A Chromium Extension for a Weird Edge Case

In which we open a lot of links

MassLinkOpener - A Chromium Extension for a Weird Edge Case

We recently began the arduous process of replacing JPEG images on 75CentralPhotography.com with WebP formatted images.

But why?

Well, we’re replacing all the photos on our site with WebP versions to improve performance and image quality. WebP files are significantly smaller than JPEGs while maintaining comparable—or often better—visual fidelity, which means faster page load times and reduced bandwidth usage. This not only enhances the user experience, especially on mobile devices, but also supports better SEO performance due to improved site speed. Additionally, WebP supports modern features like transparency and higher compression efficiency, making it a future-proof format for the web.

However, this means, for the site, replacing over 7000 photos from the last 18 years with new versions...a process described as "arduous" above and described here as "onerous".

Luckily, there's a nice plugin for Wordpress that lets us replace existing photos with new versions while automatically updating any links on the site so that it's not quite as bad as it could be—the other option would be to go to each post and manually replace and save the post. (This isn't a great idea, though...it leaves orphaned images in your media library and breaks filenaming if you have upload a new file with the same name as the old).

The friction point with this process is that we have to click the replace media link on each image in the media library:

This got old pretty quick, so I through together a Chrome/Edge/whatever Chromium-based browser extension that let's us type in a string to search for in the current page and, for each instance that's also a link, open it in a new tab:

Clicking the Open All Links button opens each found link in a new tab, making it a bit faster to go through each image and replace it:

You can find the extension here (be sure to read the installation instructions if you're unfamiliar with installing extensions outside the Chrome Web Store) and download the latest version here.