Day 5, 20 minutes · beginner
The last mile
You''ve found the asset, previewed it in context, and picked a winner. Last step: ship cleanly and dispose of the scaffolding.
The one-line change
The three URLs below are templates, not live links. Replace {PEXELS_PHOTO_ID} or {PEXELS_VIDEO_ID} with the id from the Pexels page of your winner.
Image:
<img src="https://images.pexels.com/photos/{PEXELS_PHOTO_ID}/pexels-photo-{PEXELS_PHOTO_ID}.jpeg?w=1920"
alt="..." />
Video:
<video autoplay muted loop playsinline
poster="https://images.pexels.com/videos/{PEXELS_VIDEO_ID}/pexels-photo-{PEXELS_VIDEO_ID}.jpeg">
<source src="https://videos.pexels.com/video-files/{PEXELS_VIDEO_ID}/{PEXELS_VIDEO_ID}-uhd_3840_2160_30fps.mp4"
type="video/mp4" />
</video>
Point directly at the Pexels CDN URL. No file in your repo. Pexels pays the bandwidth.
Ask Claude Code to do the swap: "Replace the hero image in HomeHero.tsx with this Pexels URL — keep the same classes and alt text."
Clean up
Delete:
/public/prototype/picker.html/public/prototype/manifest.jsonscripts/fetch-stock.mjs— or keep it around if you''ll run the exercise again for another asset. Small enough not to matter.
Add the winning asset''s attribution to your site credits page. Pexels doesn''t require it, but your community will notice.
Two gotchas worth remembering
Video decoder limits. A page with more than ~8 live <video> elements will stall newer ones. Cap the live pool, or mount / unmount as the user scrolls.
Double ?. If your framework appends transform params to image URLs (?w=1200) and the CDN URL already has a ?, you''ll break the image with two question marks. Use & for the join when a ? is already present.
Both of those are real bugs that shipped — and got fixed — in the project that spawned this training.
Your final check
Your commit diff should contain:
- ✅ Updated hero component, pointing at a vendor CDN URL
- ✅ Deleted
/prototype/*files - ✅ Deleted (or kept, but used)
fetch-stock.mjs - ❌ Zero image or video bytes added anywhere
If all four boxes tick, you''ve shipped a professional hero with zero impact on repo size, build time, or bandwidth quota.
What you now know how to do
- Find free stock media across four catalogs and pick the right one per job
- Use a CDN URL instead of downloading — the core pattern that makes everything else scale
- Get Claude Code to write your fetch scripts and picker pages
- Ship the winner and tear down the scaffolding
That''s the whole workflow. Same pattern works for images, videos, audio, fonts — any remote asset. Good luck.
Today's actions
Ticks are not saved without an accountDo it in your tool
Claude
- Install or open the Claude desktop app, sign in and click the Code tab at the top of the sidebar.
- In the row under the prompt box, click the environment selector and select the top entry in the Local group. Then click the project folder control, select Open folder… and choose your project.
- In the mode selector in the same row, pick Manual, so Claude asks before it edits a file or runs a command.
- Ask Claude
commit my changes with a descriptive messagebefore you change anything. Your picker and fetch script then stay in your Git history, so you can get them back. - Paste this prompt with your hero file, the winner's CDN address (plus its poster address for a video) and your credit line in it and press Enter. To keep the fetch script, take it out of the prompt first. Read each change and each deletion before you approve it.
In [YOUR HERO FILE], replace the current hero image or video with this web address: [WINNER CDN ADDRESS]. Keep the same classes and alt text. Use the address only, do not download the file. If the winner is a video, use a video tag with autoplay, muted, loop and playsinline, and this poster address: [POSTER ADDRESS, ONLY FOR A VIDEO]. Then delete the folder public/prototype and the file scripts/fetch-stock.mjs. Add this credit to my credits page: [YOUR CREDIT LINE]. Finally list every changed file and confirm that no image or video file was added to the project. - Click the line-count indicator (such as
+12 -1) to open the diff view. Check: the hero file, the credits page, the removed prototype files, and no image or video file. - Ask Claude
commit my changes with a descriptive messageagain. - Deploy the way your host does it. Then open the Browser pane (Ctrl+Shift+B on Windows, Cmd+Shift+B on macOS) and ask Claude to open your live address there to check that it loads.
Note: In Claude this task runs in Claude Code, the Code tab of the desktop app. If Claude wants to open a site you have not approved, a card offers Allow once, Always allow or Deny. On a Team or Enterprise plan an admin can switch off Claude Code in the desktop app, or block outside sites in the Browser pane. The Claude Code tab of this lesson shows the same task in the terminal. No paid Claude plan? The ChatGPT tab of this lesson needs none.
Paid planNeeds a paid Claude plan: Pro, Max, Ultra, Team or Enterprise. The Free plan does not include Claude Code.
ChatGPT
- Copy the winner's CDN address from your picker page, and its poster address if it is a video. This step happens outside ChatGPT.
- Install or open the ChatGPT desktop app (macOS or Windows), sign in with your ChatGPT account and select Codex from the ChatGPT dropdown.
- Open your project folder: on Windows click Add new project or press Ctrl+O, on macOS press Cmd+O. Commit your work with your own Git tool before you go on, so you can get the picker and the fetch script back.
- Paste this prompt in the composer with your hero file, the winner's CDN address (plus its poster address for a video) and your credit line in it and send it. To keep the fetch script, take it out of the prompt first.
In [YOUR HERO FILE], replace the current hero image or video with this web address: [WINNER CDN ADDRESS]. Keep the same classes and alt text. Use the address only, do not download the file. If the winner is a video, use a video tag with autoplay, muted, loop and playsinline, and this poster address: [POSTER ADDRESS, ONLY FOR A VIDEO]. Then delete the folder public/prototype and the file scripts/fetch-stock.mjs. Add this credit to my credits page: [YOUR CREDIT LINE]. Finally list every changed file and confirm that no image or video file was added to the project. - Open the review tab (Ctrl+Shift+G on Windows). It shows Unstaged changes first. Last turn shows only what Codex did in its most recent turn.
- Check the diff (the list of changed lines): the hero file, the credits page, the removed prototype files, and no image or video file. On macOS, check with your own Git tool, for example
git status: it lists the changed, new and deleted files. - Click Stage all to stage the whole diff, or Revert all to throw it away. Then commit from the review pane or with your own Git tool.
- Deploy the way your host does it and check the live site yourself. ChatGPT does not cover this step.
Note: No paid plan needed: Codex is included on every plan. On Free and Go the Codex allowance is limited, and Codex in the desktop app is subject to rollout. The review tab needs a project inside a Git repository. You can also stage or revert one file or one part of a file. A workspace admin can switch Codex off.
Gemini
- Copy the winner's CDN address from your picker page, and its poster address if it is a video. Note which file holds your hero, for example
HomeHero.tsx. - On a computer, go to
gemini.google.comand sign in with your Google Account. - Click Add files, then More Uploads, then Import Code, then Upload folder. Pick the small folder that holds your hero component, not the whole project.
- Paste this prompt in the text box, put the winner's CDN address (and its poster address for a video) in it and click Submit.
This folder holds my hero component. In it, replace the placeholder image or video source with this web address: [WINNER CDN ADDRESS]. If the winner is a video, use a video tag with autoplay, muted, loop and playsinline, and this poster address: [POSTER ADDRESS, ONLY FOR A VIDEO]. Keep the same classes and the same alt text. Use the address only and add no media file. If the address already contains a ?, join any extra parameter with & and never with a second ?. Show me the whole changed file so I can paste it into my project. Then write one credit line for my credits page, with a placeholder for the photographer's name. - Read the changed file. Check that the classes and alt text are untouched, then paste it by hand into your own project file.
- Delete
public/prototypeyourself, andscripts/fetch-stock.mjsif you will not reuse it. Add the credit line to your credits page. - Commit with your own Git tool and look at the diff (the list of changed lines): the hero file, the credits page, the removed prototype files, and no image or video file.
- Deploy the way your host does it and check on the live site that the image or video loads.
Note: Google names no paid plan for uploading a code folder on a personal account. On a work or school account it depends on your Workspace edition. Gemini reads the folder but cannot write to your project, so you make the changes yourself. The help page gives up to 5,000 files and 100 MB for a code folder, but also says each file inside counts towards the 10-file limit. Keep the folder small. Antigravity CLI is Google's tool for work inside a project folder. This course has no checked guide for it.
Microsoft Copilot
- Open the Microsoft Copilot desktop app with your work account and select Code, at the top of the app or in the left navigation. No Code tab? Copilot Code is a paid preview that personal accounts in the Netherlands cannot get: see the notes.
- Commit or back up your work with your own Git tool, so you can get the picker and the fetch script back. Then open your project folder as a local project. No local folder offered? Your admin may allow cloud projects only.
- Keep the sandbox on and leave Always allow off. Microsoft says to use caution when you turn it on.
- Paste this prompt with your hero file, the winner's CDN address (plus its poster address for a video) and your credit line in it and send it. To keep the fetch script, take it out of the prompt first.
In [YOUR HERO FILE], replace the current hero image or video with this web address: [WINNER CDN ADDRESS]. Keep the same classes and alt text. Use the address only, do not download the file. If the winner is a video, use a video tag with autoplay, muted, loop and playsinline, and this poster address: [POSTER ADDRESS, ONLY FOR A VIDEO]. Then delete the folder public/prototype and the file scripts/fetch-stock.mjs. Add this credit to my credits page: [YOUR CREDIT LINE]. Finally list every changed file and confirm that no image or video file was added to the project. - Read the file location in an approval dialog if one appears. Approve only for the prototype folder and the fetch script.
- Review the changes in the code view: the hero file, the credits page, and only the prototype folder and the fetch script gone.
- Commit with your own Git tool, as in lesson 3. Check in the diff that no image or video file was added.
- Deploy the way your host does it and check that the live site loads the image or video.
Note: Copilot Code is a preview (Frontier), in English at this release. Personal accounts: United States and Canada only at launch, so not the Netherlands. Work accounts in the Netherlands: not confirmed. If your project is on GitHub and your admin has switched on the GitHub connection (off by default), you can also ask Copilot Code for a branch, a commit and a draft pull request. No Code tab? Then this course has no checked Microsoft Copilot steps for this task: use the ChatGPT or Gemini tab.
Paid planBilled by usage. Work: a Copilot licence (Microsoft pages differ on which), Frontier access, admin turns on the Code tab, a spending policy. Personal: Microsoft 365 Premium or Pro, US and Canada only.
Claude Code
- Open a terminal in your project folder and start Claude Code, as in the Claude Code tab of lesson 2.
- Ask
commit my changes with a descriptive messagebefore you change anything. Claude's undo does not track files that a command deleted, so this commit is your way back. - Paste this prompt with your hero file, the winner's CDN address (plus its poster address for a video) and your credit line in it. To keep the fetch script, take it out of the prompt first.
In [YOUR HERO FILE], replace the current hero image or video with this web address: [WINNER CDN ADDRESS]. Keep the same classes and alt text. Use the address only, do not download the file. If the winner is a video, use a video tag with autoplay, muted, loop and playsinline, and this poster address: [POSTER ADDRESS, ONLY FOR A VIDEO]. Then delete the folder public/prototype and the file scripts/fetch-stock.mjs. Add this credit to my credits page: [YOUR CREDIT LINE]. Finally list every changed file and confirm that no image or video file was added to the project. - Read each change Claude Code shows you. If it asks, select Yes only for what you asked for: the hero file, the credits page and the deleted files.
- Ask
what files have I changed?and check the list: the hero file, the credits page, the removed prototype files, and no image or video file. - Run
/rewindor/undoand choose Restore code if an edit went wrong. A deleted file comes back from your Git commit, not from the rewind. - Ask
commit my changes with a descriptive messageagain. - Deploy the way your host does it and check in your own browser that the live site loads the image or video. Neither is a Claude Code step.
Note: This is the terminal route. If you prefer a window, the Claude tab of this lesson shows the same task in the Code tab of the Claude desktop app, with the diff view. In the terminal Claude Code (version 2.1.283 or later) starts in auto mode: a classifier checks actions instead of asking you, so a delete may run without a question. The status bar shows the current mode. That is why step 2 commits first.
Paid planNeeds a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. The Free plan does not include Claude Code.
Create a free account to save your progress
Free, and no payment details. Your ticks and finished lessons are kept, on every device.
Create a free account I already have an accountCreate a free account to save your progress. Sign in or sign up