Optimize the largest assets first
Photo and video delivery usually consumes more bandwidth and processing time than application pages. Use image resizing, WebP or AVIF, video preparation, lazy loading, and appropriate cache headers.
Production recommendations
- Enable application and data caching where supported.
- Use a CDN or object storage for large libraries.
- Configure compression and long-lived immutable asset caching.
- Run media and email work in background workers.
- Monitor disk space, queue depth, database size, error rate, and response time.
- Keep backups outside the primary server.
Performance controls should be changed incrementally and tested on real pages. Aggressive caching can hide updates if invalidation is misconfigured.
