Skip to content
EPUBCheck · Resources and references

EPUBCheck RSC-009: fragment on a raster image

Updated:

EPUBCheck RSC-009 is a warning message: “A non-SVG image resource should not be defined with a fragment identifier.” A reference to a raster image (JPEG, PNG, GIF, WebP) includes a fragment identifier (#part), which only makes sense for SVG images. Reading apps ignore or mishandle the fragment, so the image may not show as intended.

The official message

A non-SVG image resource should not be defined with a fragment identifier.

Default severity
Warning. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.
EPUBCheck version
5.4.0

Typical causes

  • A URL such as images/map.png#region copied from a web page or an image map.
  • A tool that adds fragments to every image reference.

How to fix it

  1. Find the image reference named in the message.
  2. Remove the #fragment from the reference to the image.
  3. If you need to show part of an image, crop it into its own file or use SVG.

When it's not this

A fragment that points to an id that does not exist in an XHTML document is RSC-012.

Terms used here

Other RSC messages

  • RSC-008 Referenced resource "…" is not declared in the OPF manifest.
  • RSC-010 Reference to non-standard resource type found.
  • RSC-007 Referenced resource "…" could not be found in the EPUB.
  • RSC-011 Found a reference to a resource that is not a spine item.
  • RSC-006 Remote resource reference is not allowed in this context; resource "…" must be located in the EPUB container.
  • RSC-006b Resource "…" is located outside the EPUB Container; please check the resource is retrieved in scripted content.

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck RSC-009 mean?

EPUBCheck RSC-009 is a warning message: “A non-SVG image resource should not be defined with a fragment identifier.” A reference to a raster image (JPEG, PNG, GIF, WebP) includes a fragment identifier (#part), which only makes sense for SVG images. Reading apps ignore or mishandle the fragment, so the image may not show as intended.

Is RSC-009 an error?

RSC-009 is reported as warning by default. The EPUB is still valid, but something is likely to cause problems in some reading apps. EPUBCheck exits with 0 unless you pass --failonwarnings.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.