Web Asset Management

Tools for managing, storing, compressing and minifying website assets.

Static files can skip a separate server: with WhiteNoise, Django static files are served by your app itself. Uploads go to cloud storage via django-storages.

How to choose:

  • Static files served by your Django or other WSGI app: WhiteNoise
  • User uploads on Amazon S3, Azure Storage, Google Cloud Storage, or SFTP: django-storages
  • CSS and JavaScript from your Django templates, combined into one file: Django Compressor

Listed in editorial order. Click a column header to re-sort the whole list.

Press / to search. Tags open their category. Click a row for details.

Search and filter

Results

Row number Tags
Simplified static file serving for WSGI apps, with compression and caching headers.
evansd/github.com/evansd/whitenoise /2,767 stars /
A collection of custom storage back ends for Django.
Compresses linked and inline JavaScript or CSS into a single cached file.

Web Asset Management guide

WhiteNoise lets your app serve its own static files, with no separate web server. It works with any WSGI app, with extra auto-configuration for Django. On Django, switch to its compressed manifest storage backend, which compresses your files and gives them hashed names, so browsers can cache them forever. Its docs advise against pushing static files to S3 with django-storages: that adds libraries, configuration, keys, and deploy steps.

django-storages is a collection of storage backends for Django, covering Amazon S3 and S3-compatible services, Azure Storage, Google Cloud Storage, Dropbox, FTP, and SFTP. Each backend has its own settings: to save uploads to S3, for example, set storages.backends.s3.S3Storage as the default backend in STORAGES and pass its settings under OPTIONS.

Django Compressor combines the CSS and JavaScript that your templates link or inline into one cached file, and browsers can cache that file forever. Wrap the tags in a {% compress %} block. By default it compresses during requests, but when you run several servers or WhiteNoise serves the files, turn on offline compression and run its compress command on deploy.

Keep user uploads out of your static files. WhiteNoise isn't suitable for serving them: uploads served from your app's own domain are a security risk, and local disk makes scaling across machines harder. Its docs point to django-storages instead. Django's own docs recommend serving uploads from a separate domain, like usercontent-example.com for example.com, not a subdomain.

Know a project that belongs here?

Tell us what it does and why it stands out.