{
  "id": 22422312,
  "title": "Object storage naming patterns for image thumbnails: WebP, AVIF and overwrite safety",
  "url": "https://urgent.news/2026/11/28/object-storage-naming-patterns-for-image-thumbnails-webp-avif-and",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-28T18:40:04.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/peregrineshaw9645/object-storage-naming-patterns-for-image-thumbnails-webp-avif-and-overwrite-safety-1db6"
  },
  "original_language": null,
  "account": "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.",
  "summary": "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…",
  "summary_source": "publisher",
  "key_points": [
    "Use immutable keys with content hash for thumbnail regeneration",
    "Format: t/{tenant}/img/{imageid}/{version}/{format}.{extension}",
    "Separate keys for each thumbnail size and codec version"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}