Add a PDF, OpenAPI file and more to your page — plus learn how to manage all your files in GitBook.

You can upload files to your GitBook space and add them to your page for people to view or download.

You can show some files, such as images and OpenAPI files, on the page itself for people to see without clicking anything. For others, such as PDFs, users will have to click to view or download it.

You can also optionally add a caption below any file you insert into your page to add more information if needed.

Example of file

Uploading a file

To upload a file, drag and drop it into the Drop your file or browse section, or select it and use your system file dialog to select the file you want to upload.

GitBook allows you to upload files up to 100MB per file.

You can also add files to your space when you add an image block or an OpenAPI block. When you create one of these blocks, the Files panel will open, so you can either select a file, or upload a new file.

Tip: You can also drag and drop images from your file system directly into the editor — or paste a copied image into your content. GitBook will automatically add them to the Files side panel for the respective space, so you can view and manage them later.

Managing files

In the Files side panel, you can search for, rename, or delete files in your current space. You can see all your uploaded files below the search bar and file upload sections.

Renaming a file

Deleting a file

Note: Make sure you update any pages that included your deleted file! File blocks that reference a deleted file will show an empty block, or Could not load image error.

Replacing a file

If you have a file that simply needs updating to a new version, you can replace it. This will swap out the old file and put the new file in its place. Any blocks that previously referred to the old file will then refer to the new file.

This can be helpful if, for example, you’ve had a major product redesign and need to update outdated UI screenshots that appear on multiple pages. Replacing the original file would update the screenshot everywhere in your space, saving you time and effort.

Tip: Once you’ve uploaded an image or a file, you can reference it anywhere in your space by creating an image or a file block and selecting it from the Files side panel.

We recommend you do this rather than uploading the image again every time you want to include it, to make it easier to replace images later and to avoid having multiple files with the same name.

If you want to embed external content into your pages, take a look at how to embed a URL.

Last updated