31 Images and Files

Last update: Aug 15/20

 

Pressbooks allows you to upload and insert many different types of files and media into your book. When uploading media into Pressbooks, note the following:

  • The maximum file size that you can upload in the Open OKState Pressbooks instance is 48 MB. (Note that this upload-size limit is different from the import-size limit, which is much larger.)
  • If you want a reader to be able to access a file without having to leave Pressbooks, then it must be uploaded to the Media Library before it is inserted into a book. It cannot be embedded by solely linking to an external source.
  • Any images that you want to embed must be JPGs, PNGs, or GIFs.
  • File types that will not embed—such as PDFs, Word files, or PowerPoint slides—can still be uploaded. Readers will be able to download these files from the book through a hyperlink.
"" See the following chapters in the Pressbooks User Guide:

Optimize images for web and print

If your goal is to produce a book for both web and print delivery at the same time, image set up and placement must be considered. We recommend centering all images and keeping the maximum image size to a width of 500 pixels and height of 600 pixels.

If you use a larger image, there is a risk that it will be pushed to another page in the PDF—sometimes several pages away from its webbook position. One solution is to add page breaks to key spots in the book.

"" See Section Breaks, Page Breaks and Blank Pages in the Pressbooks User Guide.

Some authors choose to create a separate version for print, sometimes using a different system such as InDesign, so that text and image layout for the web version can be more creative.

Image attributions

"" See Media Attributions in the Pressbooks User Guide.

Image captions

For a comprehensive discussion on caption styling, see Resources: Captions and Attributions in the Self-Publishing Guide.

Issues to Note

These issues will be resolved fwith the next Pressbooks upgrade.

  1. Images without a caption do not render properly in all eReaders.
  2. Images without captions cannot be centered. An easy work around is adding a period to the caption field, or adding the following CSS to the Custom Styles for the webbook, PDF, and eBook:
    .front-matter img, .part img, .chapter img, .back-matter img {
    display: block;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    padding: 0;
    page-break-inside: avoid !important;
    prince-image-resolution: 135dpi; }

Upload files to a book

In a book, you can link to files hosted the Pressbooks Media Library so people reading the book can access those files. This feature may be useful if you want to share files that will not display directly in Pressbooks, like PDFs, Excel spreadsheets, or PowerPoint slides.

To add a link to a file in a book in Pressbooks, follow the following steps:

  1. Click “Add Media” at the top of the Visual Editor in Pressbooks.
  2. Select the Upload Files tab and select the file you want to upload.
  3. Click “Insert into chapter.”
  4. You will be able to edit the link text as you would for a normal hyperlink.

 

License

Icon for the Creative Commons Attribution 4.0 International License

Publishing with Pressbooks Copyright © 2021 by Oklahoma State University Libraries is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book