The client and the challenge
Vizkultura is a portal on architecture, art, design, photography and film. Editors publish new photo-heavy articles every day, so the library grew to around half a million files. Media had already been moved to Cloudflare R2 with an older plugin, but uploads were not reliable: images sometimes did not make it across, local copies stayed on the disk, and there was no AVIF. When we audited the library we found a more serious problem too: when an editor uploaded a file with a name that had been used before, the old plugin overwrote the image of an older article in the bucket.
The solution
Instead of patching the old plugin once more, we moved the site to our own offload plugin, the one that does the same job on all our sites. First in R2 mode, with the same bucket and the same URLs, so nothing changed for visitors. Every file name is unique, the local copy is deleted only after the file is confirmed in the bucket, and the AVIF version is made in the background so the editor never waits. Before any of that we tested the plugin on a separate server against a real R2 bucket. Then we copied the library from R2 to our Backblaze B2 bucket in the EU, verified it file by file and sent the old addresses on with a permanent 301 redirect.
The result
The site scores 94 on the mobile PageSpeed test, and Google confirms a Core Web Vitals pass on real users (Chrome UX Report, 28 days): LCP 0.8 s, INP 65 ms, CLS 0. More important for the newsroom: uploads are predictable, no image overwrites another any more, and new images get AVIF right away.
