35 Images and Files
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 BCcampus 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 Userguide: |
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 centring 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 Userguide. |
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 captions
Issues to Note
- Images without a caption do not render properly in all eReaders.
- Images without captions cannot be centred. 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:
- Click “Add Media” at the top of the Visual Editor in Pressbooks.
- Select the Upload Files tab and select the file you want to upload.
- Click “Insert into chapter.”
- You will be able to edit the link text as you would for a normal hyperlink.