GitHub as an Image CDN
🚀 Why Use GitHub for Images?
Loading item images from a server folder can negatively impact performance, especially during initial load times when players join. Instead of storing the same images in multiple folders across different scripts, you can use a GitHub repository to store and serve all your images efficiently. This way:
- Players don’t have to download all images when joining.
- You centralize your images in one place.
- The same images can be used across multiple scripts.
- You can also use these images for Coinsystem or other scripts.
🛠️ Setting Up a GitHub Repository for Images
1️⃣ Create a GitHub Account (If You Don’t Have One)
- Go to GitHub and Sign Up (or Log In if you already have an account).
2️⃣ Create a New Repository
- Click on your profile icon (top right) and select Your repositories.
- Click the green New button.
- Enter a repository name (e.g.,
fivem-item-images
). - Select Public (so images can be accessed by anyone).
- Click Create repository.
3️⃣ Upload Your Images
- Inside your new repository, click Add file → Upload files.
- Drag and drop your image files (e.g.,
ammo.png
,medkit.png
,weapon_ak47.png
). - Click Commit changes to upload the images.