         publication.version = epubVersion
         publication.internalData["type"] = "epub"
         publication.internalData["rootfile"] = container.rootFile.rootFilePath
-        // CoverId.
-        var coverId: String?
-        if let coverMeta = document.root["metadata"]["meta"].all(withAttributes: ["name" : "cover"])?.first {
-            coverId = coverMeta.attributes["content"]
-        }
         try parseMetadata(from: document, to: &publication)
-        parseRessources(from: document.root["manifest"], to: &publication, coverId: coverId)
+        parseRessources(from: document.root["manifest"], to: &publication)
+        coverLinkFromMeta(from: document.root["metadata"], to: &publication)
         parseSpine(from: document.root["spine"], to: &publication)
         try parseMediaOverlay(from: container, to: &publication)
         return publication

                //publication.links.append(link)
            }
            publication.resources.append(link)
        }
    }


                continue
            }
            let link = linkFromManifest(item)
            // If it's a media overlay ressource append it to the publication links.
            if link.typeLink == "application/smil+xml" {
                // Retrieve the duration of the smil file in the otherMetadata.
