Documentation Index
Fetch the complete documentation index at: https://docs.pixeltable.com/llms.txt
Use this file to discover all available pages before exploring further.
- Computed media (AI-generated outputs) automatically uploads to your bucket
- Input media can optionally be persisted for durability
- Files are cached locally and downloaded on-demand
-
Global defaults in
config.toml: -
Per-column destination (computed columns only):
What you’ll learn
- Where Pixeltable stores files by default
- How to specify destinations for individual columns
- How to configure global destinations for all columns
- How destination precedence works
How it works
Pixeltable decides where to store media files using this priority:- Column destination (highest priority) —
destinationparameter inadd_computed_column() - Global configuration —
input_media_dest/output_media_destin config file - Pixeltable’s default local storage — Used if nothing else is configured
Prerequisites
For this notebook, you’ll need:pixeltableandboto3installed- (Optional) Cloud storage credentials if you want to use a cloud provider
Setup
Let’s set up our demo environment. We’ll create a Pixeltable directory for this demo, set up local destination paths, create a table, and insert a sample image. You can substitute cloud storage URIs (likes3://my-bucket/path/)
anywhere you see a local destination path.
Created table ‘media’.
We can inspect the schema before adding images to our table:
Inserted 1 row with 0 errors in 0.77 s (1.29 rows/s)
1 row inserted.
And we can see the image in our table:
Default destinations
By default, Pixeltable stores all media files in local storage under~/.pixeltable/media:
- Input files (files you insert) — If you insert a URL, Pixeltable stores the URL and downloads it to cache on access. If you insert a local file path, Pixeltable just stores the path reference (the file stays where it is).
- Output files (files Pixeltable generates) — Stored in
~/.pixeltable/media
Added 1 column value with 0 errors in 0.02 s (45.44 rows/s)
1 row updated.
Check the file URL - it points to ~/.pixeltable/media, the default
location for generated files.
Per-column destinations
When you create a computed column, you can specify exactly where to store generated files using thedestination= parameter. This gives you
fine-grained control over outputs, which may be costly and/or difficult
to re-generate.
We’ll create a destination directory for storing one of our processed
images. For this demo, we’re using a local directory on your Desktop,
but you can replace this path with a cloud storage URI (like
s3://my-bucket/rotated/).
Added 1 column value with 0 errors in 0.02 s (48.98 rows/s)
1 row updated.
Compare the file URLs. The rotated image uses our explicit
destination, while flipped (created earlier) uses the default
~/.pixeltable/media location.
Changing global destinations
Instead of settingdestination= on every column, you can change the
global default for ALL columns.
Output and input destinations
You can configure two types of global destinations:output_media_dest— Changes the default for files Pixeltable generates (computed columns)input_media_dest— Changes the default for files you insert into tables
How to configure
You have two options: Option 1: Configuration file (~/.pixeltable/config.toml)
Supported providers and URI formats
For complete authentication and setup details, see the Cloud Storage documentation.Overriding global destinations
Even if you configure global destinations, you can still override them for specific columns using thedestination= parameter in
add_computed_column().
Let’s create a new destination directory and add a thumbnail column that
uses it.
Added 1 column value with 0 errors in 0.02 s (47.89 rows/s)
1 row updated.
Let’s view the thumbnail and its file URL. The explicit destination=
parameter always wins, regardless of global configuration.
Getting URLs for your files
When your files are in blob storage, you can get URLs that point directly to them. These URLs work in HTML, APIs, or any application you need to serve media with. The.fileurl property gives you direct URLs you can use anywhere.
Generating presigned URLs
Note: This section only applies if you’re using cloud storage (S3, GCS, Azure, R2, B2, Tigris). If you’re following along with local destinations (as in the examples above), you can skip this section or configure cloud storage to try it out. When your files are in cloud storage, the.fileurl property returns
storage URIs like s3://bucket/path/file.jpg. These aren’t directly
accessible over HTTP.
For private buckets or when you need time-limited HTTP access, use
presigned URLs. These are temporary, authenticated URLs that allow
anyone to access your files for a limited time without needing
credentials.
Presigned URLs are particularly useful for:
- Sharing files from private buckets without making them public
- Creating temporary download links with expiration
- Serving media in web applications without exposing credentials
- Providing time-limited access to sensitive content
presigned_url function from pixeltable.functions.net:
Added 1 column value with 0 errors in 0.22 s (4.46 rows/s)
1 row updated.
Common expiration times
Note: Different storage providers have different maximum expiration limits. For example, Google Cloud Storage has a maximum 7-day expiration for presigned URLs.Troubleshooting presigned URLs
Ifpresigned_url() isn’t working:
- Local files: Presigned URLs only work with cloud storage (S3, GCS, Azure, R2, B2, Tigris). If your files are stored locally (default), you’ll get an error. Configure a cloud destination first.
-
Already HTTP URLs: If
.fileurlreturns anhttp://orhttps://URL (not a storage URI likes3://), the file is already publicly accessible and doesn’t need a presigned URL. - Credentials: Ensure your cloud storage credentials are properly configured. See the Cloud Storage documentation for provider-specific setup.
Common patterns
Here are a few real-world patterns you might use:Pattern 1: All media in one place
If you want everything in the same bucket, configure both input and output destinations in~/.pixeltable/config.toml:
Pattern 2: Separate input and output
Keep source files separate from processed files in~/.pixeltable/config.toml:
Pattern 3: Override for specific columns
Use a global default, but send some columns elsewhere. First, set a global default in your config:Where do my files go?
Understanding how Pixeltable handles different types of input files helps you make better decisions about storage configuration. When you configure a cloud destination, Pixeltable populates both the destination and the local cache efficiently duringinsert(). For URLs,
this means downloading once and using that download for both the upload
and cache—avoiding wasteful upload→download cycles.
What you learned
- Pixeltable uses local storage by default for all media files
- You can override the default for specific columns with the
destinationparameter - You can change the global default with
input_media_destandoutput_media_dest - Precedence: column destination > global config > Pixeltable’s default local storage
- Use
.fileurlto get URLs for your stored files - Use
net.presigned_url()to generate time-limited, authenticated HTTP URLs for cloud storage files - Pixeltable handles caching intelligently to avoid wasteful operations
See also
- Load from S3 - Import media from cloud storage
- Cloud Storage Integration - Provider setup
Next steps
- See the Cloud Storage documentation for complete provider setup and authentication details
- Check out Pixeltable Configuration for all config options
- Join our Discord community if you have questions