Skip to content
Glossary

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-029 The file "…" does not appear to match the media type …, as specified in the OPF file.
  • OPF-035 Media type "text/html" is not appropriate for XHTML/OPS.
  • MED-003 Picture "img" elements must reference core media type resources, but found resource "…" of type "…".
  • PKG-022 Wrong file extension for image. The image is a "…" file but has the file extension "…".
  • PKG-021 Corrupted image file encountered.
  • RSC-008 Referenced resource "…" is not declared in the OPF manifest.
  • RSC-032 Fallback must be provided for foreign resources, but found none for resource "…" of type "…".
  • OPF-012 Item property "…" is not defined for media type "…".
  • OPF-013 Resource "…" is declared with MIME type "…" in content, but has MIME type "…" in the package document.
  • OPF-040 Fallback item with id "…" could not be found.

Convert a PDF to EPUB
Convert up to 5 pages free, no account needed.

FAQ

What is a media type in EPUB?

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.