Skip to main content
From the chatbox, you can attach files to give Bolt visual references, add assets to your project, or share documents and code for Bolt to work with. If you want to add a file directly to your project files without using tokens, you can also use Code view.

File requirements

The number of files you can attach depends on your plan. Bolt reads each attached file up to 5 MB. You can upload a larger file (up to 10 MB on the Free plan, or 100 MB on a paid plan), but when you send the prompt, Bolt rejects any attachment over 5 MB. If that happens, shrink the file, split it, or export a smaller version.

Supported file types

Bolt supports the following formats for each type of attachment. You can upload file formats for a wide range of coding languages, but Bolt only builds JavaScript-based applications. Use files from other coding languages as a reference to guide Bolt, or ask Bolt to convert them into JavaScript.
Bolt can’t read .doc, .docx, .xls, .xlsx, .ppt, .pptx, and .zip files. To share content from one of these file formats, you can export it as a .pdf, .csv, or .txt file, or paste the text into the chat.

Image size and format limits

  • Large images: When you attach an image in chat, Bolt automatically resizes it so the longest side is about 1,500 pixels and the total size is about 1.15 MP (megapixels), keeping the same aspect ratio. Bolt can’t process images larger than 16 MP (about 4,000 x 4,000 pixels). If your image exceeds this limit, resize it and attach it again.
  • Very small images: There’s no minimum size requirement, but if your image is under about 100 x 100 pixels, you may see a warning that suggests using a higher-resolution image.
  • Images in .svg format: Bolt reads .svg files as text, not as an image. If you want Bolt to match a design or judge how a logo looks, attach the file as a .png, .jpg, or .webp instead of an .svg.

Attach a file from the chatbox

You can attach files when creating a new project on the Bolt homepage or in an existing project. To attach a file, do one of the following:
  1. In the bottom-left corner of the chatbox, click the plus icon, then click Attach file and select your files.
  2. Drag and drop the files into the chatbox.
How Bolt uses the file depends on how you describe it in your prompt. For example:
  • To add the file directly to your project: Use the attached file as a logo in the header of the website.
  • To give Bolt a visual reference for style or layout: Using the attached image for inspiration, change the site's colors, fonts, and other styles to match the image style.
If you attached an image but it isn’t showing in your project preview, try adding it directly to your project in Code view instead.

Attach a file from Code view

Adding a file directly in Code view stores it in your project files. Use this method when you need Bolt to continue referencing the file as your project evolves. Because you’re adding the file straight to your project, this method doesn’t consume any tokens. We recommend that images you attach are no bigger than 1,500 pixels on their longest side. To learn more, see Image size and format limits.
If you’re using Bolt in Safari, Code view is read-only. Use the chatbox to attach your files instead.
  1. Click the <> icon to switch to Code view.
  2. Click the Public folder to expand it.
  3. Drag and drop your image file into the Public folder.
  4. Right-click the image file, then click Copy relative path. To learn more about file paths, see Copy a file’s path.
To reference the file in a prompt, paste the path and tell Bolt how to use it. For example: Use public/hero-image.png for the header image.

Troubleshoot failed prompts after attaching an unsupported file type

If your prompts fail after you attach an unsupported file type, like a .docx file, the file may be stuck in Bolt’s context. Clear your context to reset it, then share the content in a supported format.