{
  "id": 11957500,
  "title": "Why a ready-made ID photo failed our browser framing check",
  "url": "https://urgent.news/2026/10/04/why-a-ready-made-id-photo-failed-our-browser-framing-check",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-04T16:05:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/pixtidy/why-a-ready-made-id-photo-failed-our-browser-framing-check-3086"
  },
  "original_language": "en",
  "account": "A bug in the browser's photo framing check was causing ready-made ID photos to fail, even though the head was properly centered. To fix this, the code was modified to clamp the crop to valid bounds and test against the rotated image. This allowed the cropped image to be checked for actual content coverage, rather than just its position within the canvas. The issue was caused by treating vertical centring as mandatory and treating the canvas boundary as the image boundary. Adjusting the code to consider the image content itself resolved the problem, allowing photos with blank corners to pass the test.",
  "summary": "Treat head centring as a preference: clamp the crop to valid bounds, then test against the rotated image. That fixed our framing bug. A −1.1° rotation left roughly 10 px of blank space at the top corners of a 538 px-wide crop. You can check your own photo against these rules for free in your browser on this page ; the photo is never uploaded (disclosure: I built it). Why did ready-made ID photos…",
  "key_points": [
    "Browser's photo framing check had bug causing ready-made ID photos to fail.",
    "Code modified to clamp crop to valid bounds and test rotated image.",
    "Issue resolved by considering image content, not just position within canvas."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}