Media

The term “media” refers to any files that you might add to a site for visitors to experience: images, movies, music, PDFs, etc.

Sandvox allows you to customize how media is stored for a site using the Site Inspector.

Note that if you decide to move your site to another computer you’ll likely want to change your media preferences to “Copy all files” before moving the document.

To set how media files are stored:

  1. Open the Site Inspector.
  2. Go to the “Media” tab.
  3. Make your choice using the “Keep media originals with document” popup.

InspectorKeepMediaOriginals

The available options are:

Automatic
All media files are copied into the document except those in:
  • your iTunes library
  • your iPhoto library
  • the Movies, Music and Pictures folders in your Home Directory
Copy all files
All media files are copied into the document.
Reference all files
No media files are copied into the document, Sandvox just keeps an alias to where the originals are kept.


Sandvox utilizes a smart mechanism when copying media files into a document; Media is only copied if not already present. For example, if you have the site set to “copy all files” and then proceed to place the same photo on multiple pages of the site, Sandvox will only copy the image once. This stops the site document from swelling to an unnecessarily large size.

Note that if you later change the document’s setting to “Copy all files”, any referenced media will be copied into the document during the next save. If you change the document from “Reference all files” to “Automatic”, Sandvox will copy into the document all media which is not in an “Automatic” location. Any media already copied into the document will remain with the document regardless of any change in media storage options for that document.

Why the Choice?

Sandvox gives you this choice to handle the trade-off between portability of your site and disk space. Imagine you want to add a 50 MB movie to your site. Where should Sandvox keep it?

If the movie is kept inside of the Sandvox document, there will be two copies; the original and the one inside the document. This will take up twice the disk space, but it does mean that you could move the document to another computer or delete the original movie, and everything would still work fine.

The alternative is to not copy the movie. Instead, Sandvox can just store a little note saying where the movie is on your computer. This saves on disk space, but if you delete the movie, or move the document to another computer, Sandvox may not be able to find it again.

So Sandvox offers the choices outlined above so you can make the decision that best suits your needs.

Note that starting with Sandvox 1.6, the default choice for all new documents is “Copy all files.” This is recommended for greatest flexibility, though see Movies, below. You are free to make your own choice using the Site Inspector given the caveats above. Keep in mind that any media added to the document while the setting is “Copy all files” will remain with the document even if you later change this setting.

Images

If you add an image to a site that is not in a supported format, it will be converted and copied into the document regardless of the above setting.

Movies

Due to their large size, we generally recommend that you do not add movie files to a site so in such a way that they are copied into the document. Instead, set the referencing to "Automatic" and place the videos in the "Movies" folder in your Home directory.

Publishing

When publishing, Sandvox places all media files in a directory named "_Media."

How can we improve this page? Let us know.