{
  "id": 21165020,
  "title": "Audit EPUB Cover Metadata With a Small Python Script",
  "url": "https://urgent.news/2026/11/22/audit-epub-cover-metadata-with-a-small-python-script",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-22T04:24:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/tieli_liao_33e14817c86328/audit-epub-cover-metadata-with-a-small-python-script-3lp2"
  },
  "original_language": "en",
  "account": "Cover metadata in an EPUB file can be checked using a small Python script. The script reads the container.xml, finds the OPF package file, and compares various elements related to the cover image. Key points include the EPUB being a ZIP file, metadata declarations for EPUB 3 and EPUB 2, and the need for all declarations to point to the same item with the correct media type. An EPUB cover can show as a cover in one app but appear as a grey tile on Kindle due to missing or incorrect metadata.",
  "summary": "When an EPUB shows its cover in Apple Books or Calibre but arrives on a Kindle as a grey tile, the image is usually fine. What is broken is the metadata that tells a converter which image is the cover. You can check it yourself with a short, standard-library Python script that reads container.xml , finds the OPF, and compares the EPUB 3 cover-image property, the EPUB 2 <meta name=\"cover\">…",
  "key_points": [
    "EPUB cover metadata can be audited with a small Python script",
    "Script reads container.xml, finds OPF package file",
    "Ensures all metadata declarations point to correct cover image"
  ],
  "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."
}