diff --git a/internal/epub/image/epub_image.go b/internal/epub/image/epub_image.go index e88a414..83c3f26 100644 --- a/internal/epub/image/epub_image.go +++ b/internal/epub/image/epub_image.go @@ -85,11 +85,5 @@ func (i *Image) ImgStyle(viewWidth, viewHeight int, align string) string { } } - return fmt.Sprintf( - "width:%dpx; height:%dpx; top:%.2f%%; %s;", - i.Width, - i.Height, - marginH*100/float64(viewHeight), - align, - ) + return fmt.Sprintf("top:%.2f%%; %s;", marginH*100/float64(viewHeight), align) } diff --git a/internal/epub/templates/epub_templates_style.css.tmpl b/internal/epub/templates/epub_templates_style.css.tmpl index cfa4f08..55698eb 100644 --- a/internal/epub/templates/epub_templates_style.css.tmpl +++ b/internal/epub/templates/epub_templates_style.css.tmpl @@ -15,4 +15,6 @@ img { margin:0; padding:0; z-index:0; + max-width:100%; + max-height:100%; } \ No newline at end of file diff --git a/internal/epub/templates/epub_templates_text.xhtml.tmpl b/internal/epub/templates/epub_templates_text.xhtml.tmpl index a88b9e1..21cea8f 100644 --- a/internal/epub/templates/epub_templates_text.xhtml.tmpl +++ b/internal/epub/templates/epub_templates_text.xhtml.tmpl @@ -8,8 +8,6 @@
-