Wire the winner, delete the scaffolding

Day 5, 20 minutes · beginner

Goal of this lessonReplace the placeholder in your real app with the winning asset's CDN URL, and remove the prototype folder and fetch script now that the decision is made.

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.json
  • scripts/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 account

Do it in your tool

Claude

  1. Install or open the Claude desktop app, sign in and click the Code tab at the top of the sidebar.
  2. 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.
  3. In the mode selector in the same row, pick Manual, so Claude asks before it edits a file or runs a command.
  4. Ask Claude commit my changes with a descriptive message before you change anything. Your picker and fetch script then stay in your Git history, so you can get them back.
  5. 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.
  6. 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.
  7. Ask Claude commit my changes with a descriptive message again.
  8. 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.

Checked on 30 November 2026 · Source: Claude Code docs: Use Claude Code Desktop (opens in a new tab)

Create a free account to save your progress. Sign in or sign up