Answers.Body: <p>Unless I am mistaken I hacked a fix for this at some point by (1) unzipping the epub and (2) running a sed one-liner that edited the html to embed the image in an adhoc &lt;svg&gt; tag so it automatically resized to the size of the screen and (3) zipped back the epub. Doesn't matter any more in any case because shortly afterwards I opened a ticket with pandoc-discuss asking the developers to add this enhancement to pandoc's next release … Which they did! Since this was over a year ago IIRC… current stable pandoc release should have it…</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-29T03:34:14.310Z
Answers.LastActivityDate: 2020-08-29T03:34:14.310Z
Answers.UserDisplayName: T F
Body: <p>I am using pandoc to create EPUB files from markdown files to read the EPUB on my Kobo. It works well except with the cover which is not displayed at the proper size.</p>
  
  <p>Here is the cover image:</p>
  
  <p><a href="https://i.sstatic.net/Wmmmf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Wmmmf.png" alt="enter image description here"></a></p>
  
  <p>Here is the result:</p>
  
  <p><a href="https://i.sstatic.net/3sPjX.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3sPjX.jpg" alt="photo of the EPUB displayed on my Kobo"></a></p>
  
  <p>Here is the command I use to create the book:</p>
  
  <pre><code>pandoc first.md second.md --epub-cover-image=cover.png -o ebook.epub
  </code></pre>
  
  <p>The cover image dimensions are: <code>width: 1600 px; height: 2400 px</code>
  following recommendations here:</p>
  
  <p><a href="https://www.adazing.com/ebook-cover-dimension-sizes-and-free-dimension-template/" rel="nofollow noreferrer">https://www.adazing.com/ebook-cover-dimension-sizes-and-free-dimension-template/</a></p>
  
  <p>But size is still weird with other dimensions.
  I wish it would auto-resize.</p>
  
  <p>Any idea how to fix it ?</p>
  
Tags: <epub><cover><pandoc>
Title: cover size issue with pandoc (markdown to epub) (when viewing on Kobo)
UserDisplayName: Cédric Van Rompay
ThreadText: # cover size issue with pandoc (markdown to epub) (when viewing on Kobo)
  
  (Asked by: username_0 on 2018-12-02)
  
  I am using pandoc to create EPUB files from markdown files to read the EPUB on my Kobo. It works well except with the cover which is not displayed at the proper size.
  Here is the cover image:
  
  Here is the result:
  
  Here is the command I use to create the book:
  pandoc first.md second.md --epub-cover-image=cover.png -o ebook.epub
  
  The cover image dimensions are: width: 1600 px; height: 2400 px
  following recommendations here:
  https://www.adazing.com/ebook-cover-dimension-sizes-and-free-dimension-template/
  But size is still weird with other dimensions.
  I wish it would auto-resize.
  Any idea how to fix it ?
  
  **Tags:** epub, cover, pandoc
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-29. Score: 1
  
  Unless I am mistaken I hacked a fix for this at some point by (1) unzipping the epub and (2) running a sed one-liner that edited the html to embed the image in an adhoc  tag so it automatically resized to the size of the screen and (3) zipped back the epub. Doesn't matter any more in any case because shortly afterwards I opened a ticket with pandoc-discuss asking the developers to add this enhancement to pandoc's next release … Which they did! Since this was over a year ago IIRC… current stable pandoc release should have it…
  
  
  ---
  
  