Linking to an external video
Linking to an external video
The simplest and recommended way to incorporate a video is by linking to one hosted externally, like on YouTube.
Using a video from your GitHub public folder
Using a video from your GitHub public folder
Uploading large videos to your GitHub repo can cause it to grow in size, which can affect Lovable performance (longer repo cloning times, slower startup of previews/sandbox).A better option is to use hosted services (like YouTube) or file storage options like S3, essentially giving you a URL that you can reference, as described in the previous steps.
1
Connect your GitHub repository
First, make sure your project is linked to a GitHub repo. Here’s how to set up your repo.
2
Access the public folder
Inside your connected repository, navigate to the
public
directory. This folder is specifically used for hosting project assets like images, videos, and other media.3
Upload a video
You can now add your video to the public folder by either dragging and dropping it or clicking “choose your files” to browse and upload the file from your local machine.
4
Commit the file
After selecting your video file, enter a brief commit message (e.g., “Adds a Mars video to be used in the app”) and click “Commit changes”.

5
Get the video path
Once the upload is complete, click on the video file and use the copy icon :octicons-copy-16: to copy its path. You’ll need this path in the next step.

6
Reference the video in Lovable
Now, you can embed the video by specifying the file path in your prompt. For example, you can use a prompt like this one:Ensure you use the exact file path you copied earlier.