diff --git a/document/header.go b/document/header.go index fd5e4b26c0..07a4cf1c98 100644 --- a/document/header.go +++ b/document/header.go @@ -125,6 +125,11 @@ func (h Header) AddImage(i common.Image) (common.ImageRef, error) { h.d.Images = append(h.d.Images, r) fn := fmt.Sprintf("media/image%d.%s", len(h.d.Images), i.Format) rel := hdrRels.AddRelationship(fn, unioffice.ImageType) + h.d.ContentTypes.EnsureDefault("png", "image/png") + h.d.ContentTypes.EnsureDefault("jpeg", "image/jpeg") + h.d.ContentTypes.EnsureDefault("jpg", "image/jpeg") + h.d.ContentTypes.EnsureDefault("wmf", "image/x-wmf") + h.d.ContentTypes.EnsureDefault(i.Format, "image/"+i.Format) r.SetRelID(rel.X().IdAttr) return r, nil } diff --git a/go.mod b/go.mod deleted file mode 100644 index 234a1742f8..0000000000 --- a/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/unidoc/unioffice