EPUBCheck MED_007: źródło picture bez typu
Zaktualizowane:
EPUBCheck MED_007 to komunikat o błędzie: „Picture "source" elements must define a "type" attribute when they reference foreign resources; found resource "…" of type "…".” Element source wewnątrz picture odnosi się do zasobu obcego bez atrybutu type. Aplikacja do czytania używa typu, aby pominąć formaty, których nie może wyświetlić, więc format niena podstawowy musi wskazać, co to jest; EPUBCheck nazywa plik i jego typ.
Oficjalna wiadomość
Picture "source" elements must define a "type" attribute when they reference foreign resources; found resource "%1$s" of type "%2$s".
- Domyślna powaga
- Błąd. EPUB łamie zasady specyfikacji i jest nieprawidłowy. Sklepy i Wysłanie do Kindle mogą go odrzucić, a EPUBCheck kończy działanie ze statusem 1.
- Wersja EPUBCheck
- 5.4.0
EPUBCheck drukuje ten identyfikator z podkreśleniem zamiast myślnika; ta strona używa identyfikatora dokładnie tak, jak EPUBCheck go raportuje.
%1$s, %2$s… wypełnione są plikiem, wartością lub elementem EPUBCheck znalezionym.
Typowe przyczyny
- Element obrazu napisany dla sieci, w którym elementy źródłowe często pomijają typ.
- AVIF, JPEG XL lub inne nowsze formaty oferowane bez atrybutu type.
Jak to naprawić
- Dodaj typ mediów do elementu źródłowego, na przykład
<source srcset="fig1.avif" type="image/avif"/>. - Zachowaj format podstawowy (JPEG, PNG, GIF, WebP lub SVG) w elemencie img tego samego obrazka jako zapasowy.
- Odbuduj EPUB i uruchom ponownie EPUBCheck, aby potwierdzić, że komunikat zniknął.
Kiedy to nie to
Jeśli img sam używa formatu, który nie jest podstawowy, błąd to MED-003.
Terminy używane tutaj
Inne komunikaty MED
MED-008The time specified in the clipBegin attribute must not be after clipEnd.MED-005Media Overlay audio reference … to non-standard audio type … found.MED-009The time specified in the clipBegin attribute must not be the same as clipEnd.MED-004Image file header may be corrupted.MED_010EPUB Content Documents referenced from a Media Overlay must specify the "media-overlay" attribute.MED-003Picture "img" elements must reference core media type resources, but found resource "…" of type "…".
Źródła
Tekst wiadomości i poważność z EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Wyjaśnienie przez EpubCC.