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.

How EpubCC handles it: the engine declares application/xhtml+xml for the chapters and the navigation document, text/css for the stylesheet and the real type of each extracted image, JPEG or PNG, both core media types that need no fallback. Images are requested from the PDF already at their final size, with the longest side at 1,600 pixels.

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 "…".
  • RSC-034 Scripts must have a JavaScript media type.
  • RSC-035 "…" is a legacy media type for JavaScript. Consider using 'text/javascript' instead.
  • OPF-012 Item property "…" is not defined for media type "…".

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.