What is a media type in EPUB?
Updated:
A media type (MIME type) such as application/xhtml+xml, image/jpeg or text/css tells the reading app what each file in an EPUB is. Every manifest item declares one, and it must match the file's real content.
Why it matters when you convert a PDF to EPUB
A converter that writes a PNG image but declares it as image/jpeg, or labels a chapter text/html instead of application/xhtml+xml, produces an EPUB that validators reject and some readers mishandle. EPUB 3 also lists core media types that need no fallback.
Related terms
EPUBCheck messages about this
OPF-029The file "…" does not appear to match the media type …, as specified in the OPF file.OPF-035Media type "text/html" is not appropriate for XHTML/OPS.MED-003Picture "img" elements must reference core media type resources, but found resource "…" of type "…".PKG-022Wrong file extension for image. The image is a "…" file but has the file extension "…".PKG-021Corrupted image file encountered.RSC-008Referenced resource "…" is not declared in the OPF manifest.RSC-032Fallback must be provided for foreign resources, but found none for resource "…" of type "…".OPF-012Item property "…" is not defined for media type "…".OPF-013Resource "…" is declared with MIME type "…" in content, but has MIME type "…" in the package document.OPF-040Fallback item with id "…" could not be found.
Convert a PDF to EPUB
Convert up to 5 pages free, no account needed.