Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Object storage naming patterns for image thumbnails: WebP, AVIF and overwrite safety

The constraint that decided this for us wasn't throughput or egress. It was re-uploads. We keep de-identified training artifacts per clinic in a healthtech app, and a source image gets replaced weeks after it lands — a corrected crop, a rescanned page — after which the resize job regenerates the whole derivative set: three sizes, WebP and AVIF, plus the original. Use immutable keys for that. Put…

When managing multiple thumbnail sizes in WebP and AVIF formats, the recommended naming pattern is to use an immutable key that includes the content hash of the original image. This ensures that every regeneration generates new objects, and nothing is replaced in place. The key should have the format of t/{tenant}/img/{image_id}/{version}/original.jpg to keep the untouched upload forever until retention dictates otherwise.

Separate keys should be used for each thumbnail size and format, with the file extension indicating the codec version. Tenants should always be prefixed to ensure proper isolation when using signed URLs, lifecycle rules, and list calls. Using a version number as part of the key allows for easier backups, as old versions will be preserved as backups.

The resizing job should be idempotent, meaning that running it multiple times will produce the same keys and overwrite nothing. For simplicity, backups can be managed by deleting whole version prefixes when the retention policy dictates. Finally, never build the key from the client-supplied file name, as it is metadata, not identity, and may contain insecure information according to OWASP upload guidance.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Cyberattack hits U.K. work and pensions department, officials say

The Department for Work and Pensions, the biggest-spending government department, said in a statement it had experienced "an attempt to gain unauthorized access to our systems."

  • U.K. Department for Work and Pensions targeted in cyberattack
  • Systems shut down for several days, no evidence of data breach
  • Prime Minister's office reports no malicious actors targeting other departments

Catalogue OCR Batch Admission — Rate Limits, Partial Failure, and Recovery

An overnight catalogue import has two budgets: the time available to extract text from product photos, and the bandwidth available to deliver photos without making their smallest labels unreadable. TL;DR: prefer batch submission for bulk work because it gives the import one status to watch and per-item outcomes; reserve individual calls…

  • Catalog imports have time and bandwidth constraints for text extraction
  • Batching provides single status and individual outcomes for bulk work
  • Rate limits and partial failure are impacted by batching in OCR workflow

More from Saturday, 28 November 2026 →