Answers.Body: <p>I had a similar situation: a 134 MB .mobi that I wanted to shrink.</p>
  
  <p>Here's how I reduced the file size to 26 MB.  The key to this approach is that an .epub is actually just a zipped web page with image files in it.</p>
  
  <ol>
  <li>Converted the .mobi to .epub with Calibre.</li>
  <li>Renamed the .epub to .zip.</li>
  <li>Extracted the .zip.  Note the images subfolder.  Mine had more than 1000 files in it.</li>
  <li>Used Photoshop (although any decent image editing app could do it) to do a batch job against the contents of that folder.  Saved each file as the original file name, but as a low quality .jpg.  (In my case, the original filenames were .jpeg, but Photoshop saved the new files as .jpg, so I had to delete the original .jpegs and rename the new ones from .jpg to .jpeg after the batch was completed.  There's probably a way to avoid that step.)</li>
  <li>Re-zipped it.</li>
  <li>Renamed to .epub.  I wanted an .epub as the end result, so I was done.  But you could of course now use Calibre to convert to whatever format you want.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-25T14:10:51.850Z
Answers.LastActivityDate: 2016-10-25T14:10:51.850Z
Answers.UserDisplayName: Matt Greene
Answers.Body: <p><strong>Calibre already offers this functionality without any plugin.</strong> It's part of the ebook editor that installs with Calibre. </p>
  
  <p>The editor will only edit files in the epub or azw3 format though. You can convert the mobi file to azw3 and then edit it. Converting it from mobi to azw3 may automatically downsize the file, but I'm not sure. </p>
  
  <p>Once you have the file opened in Calibre's ebook editor, click on Tools, then click "Compress images losslessly". </p>
  
  <p><code>Calibre &gt; click the ebook &gt; Edit book &gt; Tools &gt; "Compress images losslessly"</code></p>
  
  <p>This will bring up a dialog where you can accept the default compression or choose your own. The downside to this is that it only compresses images that are in the jpg format.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-19T14:53:17.893Z
Answers.Text: Thanks! This worked for me. `Calibre > click the epub book > Edit book > Tools > "Compress images losslessly"`. Then convert to mobi. I chose 50% compression, and the size went from ~50 MB to ~13 MB.
Answers.UserDisplayName: Ryan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-21T22:49:28.397Z
Answers.Text: This only works in downsizing the file size but not the resolution.
Answers.UserDisplayName: Player1
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-01T23:13:35.767Z
Answers.Text: Note that you need to go to File -> Save after performing these steps. Then on the main screen of Calibre, convert the book to the intended format again and then export again. Great answer thank you so much saved me!!
Answers.UserDisplayName: puargs
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-24T22:10:07.243Z
Answers.Text: Tried this trick with calibre 5.18.0 - got message PNG could not be further compressed
Answers.UserDisplayName: vvladymyrov
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-24T22:15:22.247Z
Answers.Text: I used online service to compress the book in epub format - https://www.onlineconverter.com/compress-epub and then downloaded it back to calibre
Answers.UserDisplayName: vvladymyrov
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2016-08-16T20:41:36.023Z
Answers.LastActivityDate: 2019-12-20T16:02:12.263Z
Answers.LastEditDate: 2019-12-20T16:02:12.263Z
Answers.UserDisplayName: ChoiceD
Answers.Body: <p>Note: I intended to leave this as a comment for @mosh but didn't have the necessary rep. This is my own personal solution based on the solution he outlined. This will recursively scan a specified directory and compress files larger than 49MB, overwriting the original files. [I chose that size due to the fact that Google Play Books uploads are limited to 50MB in size, and that's the service I utilize most frequently, generally with uploads from my Humble eBook Bundle purchases.]</p>
  
  <p>First file: shrinkemall.sh</p>
  
  <pre><code>#!/usr/bin/bash
  USAGE="Usage: $0 directory"
  : ${1:?$USAGE}
  find $1 -size +49M \
    -exec ./shrinkemall1.sh "{}" \;
  </code></pre>
  
  <p>Second file: shrinkemall1.sh</p>
  
  <pre><code>unzip -d tmp "$1"
  cd tmp
  find . -type f -iregex '^.*[.]\(jpg\|jpeg\|png\|gif\)$' \
    -exec mogrify -quality 85 -resize '800x800&gt;' {} \;
  zip -Duro "../$1" .
  cd ..
  rm -rf tmp
  </code></pre>
  
  <p>Obviously you'd want to edit the parameters to suit the service and/or device you're targeting.</p>
  
  <p>Thanks, @mosh !</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-06T19:55:58.883Z
Answers.Text: you could put shrinkemall1 as a function in your script file that calls it, so only one script file is needed
Answers.UserDisplayName: water stone
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-29T07:55:05.317Z
Answers.LastActivityDate: 2017-12-29T07:55:05.317Z
Answers.UserDisplayName: justathoughtor2
Answers.Body: <p>bash script to for bulk compressing images in big.epub to small.epub on Windows7 or Linux. 
  You need to install cygwin on windows for (bash, unzip, zip, find, imagemagick).</p>
  
  <pre><code>  #!/usr/bin/bash
    USAGE="Usage: $0 big.epub small.epub"
    : ${2:?$USAGE}
    unzip -d $1-tmp $1   # unzip big.epub in tmp directory
    cd $1-tmp
    # Compress all images larger than NxN in tmp
    find . -type f  \
     -iregex  '^.*[.]\(jpg\|jpeg\|png\|gif\)$' \
     -exec mogrify -quality 85 -resize '400x400&gt;' {} \;  
    zip -Duro ../$2 .   # Zip up the compressed tmp folder as small.epub
    cd .. 
    rm -rf $1-tmp   # Cleanup  
  </code></pre>
  
  <p>You can just get rid of all images in one step from epub file with winzip or zip, the tiny epub will still be readable without illustrations. Keep a backup of big.epub, if you want to see the images later on.</p>
  
  <pre><code> zip -d big.epub  "\*.jpg"
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-17T16:41:19.893Z
Answers.LastActivityDate: 2017-05-28T16:28:58.110Z
Answers.LastEditDate: 2017-05-28T16:28:58.110Z
Answers.UserDisplayName: mosh
Answers.Body: <p>Here is a Python script I use to automate reducing the size of epub books:
  <a href="https://github.com/murrple-1/epub-shrink" rel="nofollow noreferrer">https://github.com/murrple-1/epub-shrink</a></p>
  
  <p>Example usage:</p>
  
  <pre><code>$ python epub-shrink/app.py input_file.epub output_file.epub --jpeg-quality=25
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-22T13:11:04.017Z
Answers.LastActivityDate: 2019-05-22T13:11:04.017Z
Answers.UserDisplayName: hoju
Answers.Body: <p>The short answer is that with few exceptions you should NEVER need to scale down .mobi files because Amazon.com will do it for you. </p>
  
  <p>I think 5.5 MB is a reasonable file size for an epub file. I don't know if it is a typo, but 60MB is a bit high for mobi files. </p>
  
  <p>However, when you buy a .mobi file directly from the publisher, the preferred way to get it to your device is to upload it to Amazon's Personal Document Server which will feed it via wifi to your device.<br>
  See: <a href="http://www.pcmag.com/article2/0,2817,2484180,00.asp" rel="nofollow">http://www.pcmag.com/article2/0,2817,2484180,00.asp</a></p>
  
  <p>For mobi files, I do NOT recommend trying to transfer it to your device via USB because it requires you to put a bloated file onto a device which may not be ready to process it. </p>
  
  <p>Uploading it to Amazon.com first will let Amazon to send to device a file size appropriate for it.  </p>
  
  <p>I was testing an ebook before I published it on Amazon.com. The epub file had high quality graphics and  was 7.6 MB. The Mobi file was 16mb, but after I uploaded it to the Kindle's Personal Document server, I think the Kindle e-ink device only needed to download a smaller 1.5 MB file size to the device. It looked perfect even at that smaller size.  Amazon reduced the size and resolution of graphics to match the device. </p>
  
  <p>(It's possible that O'Reilly has multimedia files which are causing the bloat, but i doubt it.) </p>
  
  <p>Some authors and publishers have problems optimizing their graphics and file sizes, but the Oreilly guys producing those ebooks are the best in the industry. So they are providing a book optimized for several different platforms and devices.  </p>
  
  <p>If you ordered the ebook directly from Amazon, then Amazon would automatically download the file size appropriate for your device. But when you purchase the ebook directly from the publisher, you are buying essentially a file before it has been compressed by Amazon.com (that's why it is foolish to transfer the file via usb to your device). </p>
  
  <p>I am a big believer in buying the non-DRM file  from a publisher or Smashwords rather than buying it from Amazon.com, but if you do that, you need to upload it to your device. </p>
  
  <p>By the way, as someone who produces ebooks, producing .mobi files are a real pain in the neck --although I appreciate that Amazon now is sending you a file size according to what your device can handle. </p>
  
  <p><strong>See also:</strong> this article explains why mobi files tend to be so huge and why it doesn't matter for the end user. <a href="https://www.52novels.com/from-the-ebook-formatting-files-why-is-my-mobi-file-so-huge/" rel="nofollow">https://www.52novels.com/from-the-ebook-formatting-files-why-is-my-mobi-file-so-huge/</a></p>
  
  <p><strong>FURTHER THOUGHTS:</strong> I occasionally have issues reading epub files with lots of graphics on Google Play Books or ibooks. Sometimes you're just going to have to live with the file size (especially if the graphics are a vital part of the content), but I trust O'reilly to do as much optimizing as possible.  Occasionally you have self-published ebooks by amateurs which make no effort to keep file size down. This raises an interesting question: what file size would be difficult to read on current devices and reading software? Generally, if the epub is over 25 MB, I have found it cumbersome to read on a tablet. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T07:33:02.740Z
Answers.Text: Why would I offer `.mobi` files I have to Amazon for scaling? I never have done so with any of the .mobi files that I've got from OReilly, so how can amazon.com scale a .mobi file they never ever touched?
Answers.UserDisplayName: Anthon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T16:22:52.113Z
Answers.Text: If I understand you correctly, you are saying, generate a file from calibre or kindlegen and then transfer via usb to the device. The device can certainly read the file, but the file will typically be larger than it needs to.-- typically 2x the size. if you upload to amazon's personal document server though, the file size will be reduced when it has been served. I confess, I don't know how much or how well Calibre reduces .mobi files better than kindlegen; Calibre is used mainly for generating DIY ebooks and not for ebooks available for sale (so I haven't used it in a while).
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T16:25:38.863Z
Answers.Text: Anthon, I can virtually guarantee that O'reilly produces an epub and uses kindlegen to convert from epub to mobi. For this reason, the .mobi file will be very bloated-- kindlegen bloats the file by design.  For this reason I would be surprised if O'Reilly recommends that customers transfer via usb instead of Amazon's own Personal Document service.
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T16:27:00.613Z
Answers.Text: Here's an article discussing this https://www.52novels.com/from-the-ebook-formatting-files-why-is-my-mobi-file-so-huge/
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T16:29:59.080Z
Answers.Text: I spent years trying to figure out Kindle's crazy specs about image resolution  for producing .mobi. Then I figured it out -- use super high quality graphics, and then let  Amazon.com do the downsizing. It's a very efficient system.
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T16:35:03.783Z
Answers.Text: Anthon, to answer your question, typically a .mobi is a conversion from .epub and so is always inferior to the original epub. . My rule of thumb is to always prefer epub and always try to read it on  the epub reader native to a device (iBooks, GPB, etc). So while I might agree to read a Kindle ebook on my ipad as a last resort,the best case is to read an epub on ibooks. PS, the Kindle android app is much better than the Kindle app on ios.
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-12T22:38:59.910Z
Answers.Text: Whether you do it yourself or let Send-to-Kindle do it, the answer is still the same: O'Reilly is NOT  expecting you to sideload the 60mb .mobi file via usb.
Answers.UserDisplayName: idiotprogrammer
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T00:52:49.553Z
Answers.LastActivityDate: 2016-08-10T16:38:34.063Z
Answers.LastEditDate: 2016-08-10T16:38:34.063Z
Answers.UserDisplayName: idiotprogrammer
Answers.Body: <p>Just install and use Send to PC official Kindle app for transferring files over the air to your device <a href="https://www.amazon.com/gp/sendtokindle/pc" rel="nofollow noreferrer">https://www.amazon.com/gp/sendtokindle/pc</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-19T22:07:45.260Z
Answers.Text: I used this to get a file over 50mb to my kindle, via the cloud.  It's also available for other platforms like macOS.
Answers.UserDisplayName: Pellet
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-21T03:40:06.020Z
Answers.LastActivityDate: 2018-04-21T03:40:06.020Z
Answers.UserDisplayName: Satbir Singh
Body: <p>Some of the last O'Reilly ebooks I got have become really large (e.g. 60MB for the mobi version and 5.5MB for the epub version) - and these are computer science text books (not art books). The customer support claims that this is o.k. and they want to provide high quality images. </p>
  
  <p>Is there software that can easily reduce the size of images in an epub or mobi by e.g. downsampling them? Is there a calibre plugin for this?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-10T05:33:26.070Z
Comments.Text: Interesting idea. Should be relatively simple to do if it doesn't exist, you don't have to analyse the HTML in the epub for that, just identify large images, scale them and reconstruct the ePub (zip) file with the images having the same name. Do you have a specific title (I still have my voucher for a free ebook from Oreilly that I got at EuroPython, so I might be able to try things out)
Comments.UserDisplayName: Anthon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-10T22:08:51.460Z
Comments.Text: @Anthon: The monster is "Cassandra The Definitive Guide Second Edition": The mobi has 60MB, the PDF 49MB and the epub 5.5MB.
Comments.UserDisplayName: Martin Schröder
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-17T00:28:11.753Z
Comments.Text: .mobi files contain multiple versions of the ebook for all the different kinds of kindles, that's one reason why they are bigger
Comments.UserDisplayName: maxwell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-08T07:55:33.060Z
Comments.Text: perhaps break the `epub` into `epub1`, `epub2`, etc?  but how...?
Comments.UserDisplayName: Thufir
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-26T20:28:29.717Z
Comments.Text: Just converting an epub file to mobi via calibre applies some compression. `2mobi() { ebook-convert "$1" "${1:r}.mobi" }`
Comments.UserDisplayName: HappyFace
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-05T12:05:32.123Z
Comments.Text: I can't comment on a post, so I will just add that I used irfanview on windows to do a batch convert of jpg to lower quality, and it reduced the size of the mobi I had from 60mb to 11mb. I think amazon has file limits on what you can send via email, so resizing was very handy. For a book on kindle, the lower quality images are not really noticeable at least in my opinion.
Comments.UserDisplayName: Jason Pell
Tags: <epub><calibre><mobi><image><optimization>
Title: How can I reduce the resolution of images in an epub or mobi file?
UserDisplayName: Martin Schröder
ThreadText: # How can I reduce the resolution of images in an epub or mobi file?
  
  (Asked by: username_0 on 2016-08-09)
  
  Some of the last O'Reilly ebooks I got have become really large (e.g. 60MB for the mobi version and 5.5MB for the epub version) - and these are computer science text books (not art books). The customer support claims that this is o.k. and they want to provide high quality images.
  
  Is there software that can easily reduce the size of images in an epub or mobi by e.g. downsampling them? Is there a calibre plugin for this?
  
  **Tags:** epub, calibre, mobi, image, optimization
  
  > **Comments:**
  > **username_1**: Interesting idea. Should be relatively simple to do if it doesn't exist, you don't have to analyse the HTML in the epub for that, just identify large images, scale them and reconstruct the ePub (zip) file with the images having the same name. Do you have a specific title (I still have my voucher for a free ebook from Oreilly that I got at EuroPython, so I might be able to try things out)  
  > **username_0**: @username_1: The monster is "Cassandra The Definitive Guide Second Edition": The mobi has 60MB, the PDF 49MB and the epub 5.5MB.  
  > **username_2**: .mobi files contain multiple versions of the ebook for all the different kinds of kindles, that's one reason why they are bigger  
  > **username_3**: perhaps break the `epub` into `epub1`, `epub2`, etc?  but how...?  
  > **username_4**: Just converting an epub file to mobi via calibre applies some compression. `2mobi() { ebook-convert "$1" "${1:r}.mobi" }`  
  > **username_5**: I can't comment on a post, so I will just add that I used irfanview on windows to do a batch convert of jpg to lower quality, and it reduced the size of the mobi I had from 60mb to 11mb. I think amazon has file limits on what you can send via email, so resizing was very handy. For a book on kindle, the lower quality images are not really noticeable at least in my opinion.  
  
  ---
  
  ## 7 answers
  
  ### Answer by username_6 on 2016-10-25. Score: 5 | Accepted answer
  
  I had a similar situation: a 134 MB .mobi that I wanted to shrink.
  
  Here's how I reduced the file size to 26 MB. The key to this approach is that an .epub is actually just a zipped web page with image files in it.
  
  1. Converted the .mobi to .epub with Calibre.
  2. Renamed the .epub to .zip.
  3. Extracted the .zip. Note the images subfolder. Mine had more than 1000 files in it.
  4. Used Photoshop (although any decent image editing app could do it) to do a batch job against the contents of that folder. Saved each file as the original file name, but as a low quality .jpg. (In my case, the original filenames were .jpeg, but Photoshop saved the new files as .jpg, so I had to delete the original .jpegs and rename the new ones from .jpg to .jpeg after the batch was completed. There's probably a way to avoid that step.)
  5. Re-zipped it.
  6. Renamed to .epub. I wanted an .epub as the end result, so I was done. But you could of course now use Calibre to convert to whatever format you want.
  
  
  ---
  
  ### Answer by username_7 on 2016-08-16. Score: 28
  
  **Calibre already offers this functionality without any plugin.** It's part of the ebook editor that installs with Calibre.
  
  The editor will only edit files in the epub or azw3 format though. You can convert the mobi file to azw3 and then edit it. Converting it from mobi to azw3 may automatically downsize the file, but I'm not sure.
  
  Once you have the file opened in Calibre's ebook editor, click on Tools, then click "Compress images losslessly".
  
  `Calibre > click the ebook > Edit book > Tools > "Compress images losslessly"`
  
  This will bring up a dialog where you can accept the default compression or choose your own. The downside to this is that it only compresses images that are in the jpg format.
  
  > **Comments:**
  > **username_8**: Thanks! This worked for me. `Calibre > click the epub book > Edit book > Tools > "Compress images losslessly"`. Then convert to mobi. I chose 50% compression, and the size went from ~50 MB to ~13 MB.  
  > **username_9**: This only works in downsizing the file size but not the resolution.  
  > **username_10**: Note that you need to go to File -> Save after performing these steps. Then on the main screen of Calibre, convert the book to the intended format again and then export again. Great answer thank you so much saved me!!  
  > **username_11**: Tried this trick with calibre 5.18.0 - got message PNG could not be further compressed  
  > **username_11**: I used online service to compress the book in epub format - https://www.onlineconverter.com/compress-epub and then downloaded it back to calibre  
  
  ---
  
  ### Answer by username_12 on 2017-12-29. Score: 5
  
  Note: I intended to leave this as a comment for @username_14 but didn't have the necessary rep. This is my own personal solution based on the solution he outlined. This will recursively scan a specified directory and compress files larger than 49MB, overwriting the original files. [I chose that size due to the fact that Google Play Books uploads are limited to 50MB in size, and that's the service I utilize most frequently, generally with uploads from my Humble eBook Bundle purchases.]
  First file: shrinkemall.sh
  #!/usr/bin/bash
  USAGE="Usage: $0 directory"
  : ${1:?$USAGE}
  find $1 -size +49M \
    -exec ./shrinkemall1.sh "{}" \;
  
  Second file: shrinkemall1.sh
  unzip -d tmp "$1"
  cd tmp
  find . -type f -iregex '^.*[.]\(jpg\|jpeg\|png\|gif\)$' \
    -exec mogrify -quality 85 -resize '800x800>' {} \;
  zip -Duro "../$1" .
  cd ..
  rm -rf tmp
  
  Obviously you'd want to edit the parameters to suit the service and/or device you're targeting.
  Thanks, @username_14 !
  
  > **Comments:**
  > **username_13**: you could put shrinkemall1 as a function in your script file that calls it, so only one script file is needed  
  
  ---
  
  ### Answer by username_14 on 2017-05-17. Score: 4
  
  bash script to for bulk compressing images in big.epub to small.epub on Windows7 or Linux. 
  You need to install cygwin on windows for (bash, unzip, zip, find, imagemagick).
    #!/usr/bin/bash
    USAGE="Usage: $0 big.epub small.epub"
    : ${2:?$USAGE}
    unzip -d $1-tmp $1   # unzip big.epub in tmp directory
    cd $1-tmp
    # Compress all images larger than NxN in tmp
    find . -type f  \
     -iregex  '^.*[.]\(jpg\|jpeg\|png\|gif\)$' \
     -exec mogrify -quality 85 -resize '400x400>' {} \;  
    zip -Duro ../$2 .   # Zip up the compressed tmp folder as small.epub
    cd .. 
    rm -rf $1-tmp   # Cleanup  
  
  You can just get rid of all images in one step from epub file with winzip or zip, the tiny epub will still be readable without illustrations. Keep a backup of big.epub, if you want to see the images later on.
   zip -d big.epub  "\*.jpg"
  
  
  ---
  
  ### Answer by username_15 on 2019-05-22. Score: 3
  
  Here is a Python script I use to automate reducing the size of epub books:
  https://github.com/murrple-1/epub-shrink
  Example usage:
  $ python epub-shrink/app.py input_file.epub output_file.epub --jpeg-quality=25
  
  
  ---
  
  ### Answer by username_16 on 2016-08-10. Score: 2
  
  The short answer is that with few exceptions you should NEVER need to scale down .mobi files because Amazon.com will do it for you.
  
  I think 5.5 MB is a reasonable file size for an epub file. I don't know if it is a typo, but 60MB is a bit high for mobi files.
  
  However, when you buy a .mobi file directly from the publisher, the preferred way to get it to your device is to upload it to Amazon's Personal Document Server which will feed it via wifi to your device.  
  See: <http://www.pcmag.com/article2/0,2817,2484180,00.asp>
  
  For mobi files, I do NOT recommend trying to transfer it to your device via USB because it requires you to put a bloated file onto a device which may not be ready to process it.
  
  Uploading it to Amazon.com first will let Amazon to send to device a file size appropriate for it.
  
  I was testing an ebook before I published it on Amazon.com. The epub file had high quality graphics and was 7.6 MB. The Mobi file was 16mb, but after I uploaded it to the Kindle's Personal Document server, I think the Kindle e-ink device only needed to download a smaller 1.5 MB file size to the device. It looked perfect even at that smaller size. Amazon reduced the size and resolution of graphics to match the device.
  
  (It's possible that O'Reilly has multimedia files which are causing the bloat, but i doubt it.)
  
  Some authors and publishers have problems optimizing their graphics and file sizes, but the Oreilly guys producing those ebooks are the best in the industry. So they are providing a book optimized for several different platforms and devices.
  
  If you ordered the ebook directly from Amazon, then Amazon would automatically download the file size appropriate for your device. But when you purchase the ebook directly from the publisher, you are buying essentially a file before it has been compressed by Amazon.com (that's why it is foolish to transfer the file via usb to your device).
  
  I am a big believer in buying the non-DRM file from a publisher or Smashwords rather than buying it from Amazon.com, but if you do that, you need to upload it to your device.
  
  By the way, as someone who produces ebooks, producing .mobi files are a real pain in the neck --although I appreciate that Amazon now is sending you a file size according to what your device can handle.
  
  **See also:** this article explains why mobi files tend to be so huge and why it doesn't matter for the end user. <https://www.52novels.com/from-the-ebook-formatting-files-why-is-my-mobi-file-so-huge/>
  
  **FURTHER THOUGHTS:** I occasionally have issues reading epub files with lots of graphics on Google Play Books or ibooks. Sometimes you're just going to have to live with the file size (especially if the graphics are a vital part of the content), but I trust O'reilly to do as much optimizing as possible. Occasionally you have self-published ebooks by amateurs which make no effort to keep file size down. This raises an interesting question: what file size would be difficult to read on current devices and reading software? Generally, if the epub is over 25 MB, I have found it cumbersome to read on a tablet.
  
  > **Comments:**
  > **username_1**: Why would I offer `.mobi` files I have to Amazon for scaling? I never have done so with any of the .mobi files that I've got from OReilly, so how can amazon.com scale a .mobi file they never ever touched?  
  > **username_16**: If I understand you correctly, you are saying, generate a file from calibre or kindlegen and then transfer via usb to the device. The device can certainly read the file, but the file will typically be larger than it needs to.-- typically 2x the size. if you upload to amazon's personal document server though, the file size will be reduced when it has been served. I confess, I don't know how much or how well Calibre reduces .mobi files better than kindlegen; Calibre is used mainly for generating DIY ebooks and not for ebooks available for sale (so I haven't used it in a while).  
  > **username_16**: username_1, I can virtually guarantee that O'reilly produces an epub and uses kindlegen to convert from epub to mobi. For this reason, the .mobi file will be very bloated-- kindlegen bloats the file by design.  For this reason I would be surprised if O'Reilly recommends that customers transfer via usb instead of Amazon's own Personal Document service.  
  > **username_16**: Here's an article discussing this https://www.52novels.com/from-the-ebook-formatting-files-why-is-my-mobi-file-so-huge/  
  > **username_16**: I spent years trying to figure out Kindle's crazy specs about image resolution  for producing .mobi. Then I figured it out -- use super high quality graphics, and then let  Amazon.com do the downsizing. It's a very efficient system.  
  > **username_16**: username_1, to answer your question, typically a .mobi is a conversion from .epub and so is always inferior to the original epub. . My rule of thumb is to always prefer epub and always try to read it on  the epub reader native to a device (iBooks, GPB, etc). So while I might agree to read a Kindle ebook on my ipad as a last resort,the best case is to read an epub on ibooks. PS, the Kindle android app is much better than the Kindle app on ios.  
  > **username_16**: Whether you do it yourself or let Send-to-Kindle do it, the answer is still the same: O'Reilly is NOT  expecting you to sideload the 60mb .mobi file via usb.  
  
  ---
  
  ### Answer by username_17 on 2018-04-21. Score: 2
  
  Just install and use Send to PC official Kindle app for transferring files over the air to your device <https://www.amazon.com/gp/sendtokindle/pc>
  
  > **Comments:**
  > **username_18**: I used this to get a file over 50mb to my kindle, via the cloud.  It's also available for other platforms like macOS.  
  
  ---
  
  