If you’ve ever hosted a website on **cPanel**, you know storage and bandwidth can get expensive—especially for **videos and high-resolution images**. Most shared hosting plans are optimized for websites, **not for large media files**. But here’s the trick I use 👇 Instead of storing videos and photos directly on my cPanel server, I offload them to **Hugging Face** (which provides free public storage and raw file access). My cPanel then only serves as the **frontend gallery**, while Hugging Face handles the heavy lifting of storage and streaming. This way: * ✅ I save hosting space and bandwidth * ✅ My videos load fast via Hugging Face’s CDN * ✅ I can still use my own domain and design for the gallery --- ## 🔹 Step 1: Upload Videos & Photos to Hugging Face 1. Create a **Hugging Face account** and open a new **Dataset Repo**. 2. Upload your files into folders like: ``` /videos/movie1.mp4 /videos/movie2.mp4 /photos/img1.jpg /photos/img2.png ``` 3. Hugging Face will give you **direct file URLs** like: ``` https://huggingface.co/datasets/your-username/your-repo/resolve/main/videos/movie1.mp4 https://huggingface.co/datasets/your-username/your-repo/resolve/main/photos/img1.jpg ``` These links can be used anywhere—just like files hosted on your own server. --- ## 🔹 Step 2: Build a Gallery Page on cPanel Next, I created a simple **PHP + HTML page** that pulls these Hugging Face files and displays them as a **video & photo gallery**. Here’s a minimal version you can use (save it as `gallery.php`): ```php "https://huggingface.co/datasets/your-username/your-repo/resolve/main/videos/movie1.mp4", "Movie 2" => "https://huggingface.co/datasets/your-username/your-repo/resolve/main/videos/movie2.mp4" ]; $photos = [ "Photo 1" => "https://huggingface.co/datasets/your-username/your-repo/resolve/main/photos/img1.jpg", "Photo 2" => "https://huggingface.co/datasets/your-username/your-repo/resolve/main/photos/img2.png" ]; ?>
All Posts
How I Host a Free Video & Photo Gallery Using Hugging Face + cPanel
If you’ve ever hosted a website on **cPanel**, you know storage and bandwidth can get expensive—especially for **videos and high-resolution images**. Most shared hosting plans...