Skip to content

Migrate user-attachments images to local repository with relative paths#184

Open
Copilot wants to merge 2 commits intomainfrom
copilot/migrate-external-images
Open

Migrate user-attachments images to local repository with relative paths#184
Copilot wants to merge 2 commits intomainfrom
copilot/migrate-external-images

Conversation

Copy link

Copilot AI commented Feb 6, 2026

Migrates GitHub user-attachments image URLs to local files in .github/images/ with relative links. This improves content portability and ensures images remain accessible independent of external hosting.

Changes

  • Images: Downloaded 12 images with descriptive kebab-case filenames based on content (e.g., green-code-button.png, vs-code-explorer-tab.png, rebuild-codespace-command.png)

  • Markdown updates: Changed 14 image references across 4 files in .github/steps/ from absolute user-attachments URLs to relative paths (../images/filename.png). Preserved all existing attributes (width, alt text)

  • Workflow version: Updated start-exercise workflow to v0.8.0 in 0-start-exercise.yml (first version supporting relative image paths)

External images (octodex, shields.io) remain as absolute URLs.

- <img width="300" alt="green code button" src="https://github.com/user-attachments/assets/a9d80b0d-4614-4b26-83dd-b4b6fefd76c9" />
+ <img width="300" alt="green code button" src="../images/green-code-button.png" />
Original prompt

Image Migration Task: Migrate External Images to Local Repository

Objective

Migrate GitHub user-attachments image references to local repository files in .github/images/ with descriptive filenames and relative links.

Task Steps

1. Find All User-Attachments Image References

Search .github/steps/*.md files for user-attachments image URLs:

  • https://github.com/user-attachments/assets/*

Important: Only migrate user-attachments images. Leave other external images (octodex, img.shields.io, etc.) as absolute URLs.

2. Create Images Directory

mkdir -p .github/images

3. Download and Rename Images

For each user-attachments image:

Download the image:

curl -L "<image-url>" -o ".github/images/<descriptive-name>.png"

Naming convention:

  • Use kebab-case (lowercase with hyphens)
  • Name based on content or alt text
  • Keep it descriptive and clear
  • Preserve original file extension

Examples:

  • Alt text "search box with 'python' value" → python-search-box.png
  • Alt text "target branch settings" → branch-protection-target-settings.png
  • Generic "image" with button context → new-workflow-button.png

Do not download:

  • Octodex images (octodex.github.com)
  • Badge images (img.shields.io)
  • Any other external hosted images

4. Update Markdown References

Replace user-attachments URLs with relative paths:

Find pattern:

src="https://github.com/user-attachments/assets/..."

Replace with:

src="../images/descriptive-filename.png"

Important:

  • Preserve all other attributes (width, alt text, etc.)
  • Do not change other external image URLs (octodex, shields.io, etc.) - keep them as absolute references

5. Verify Changes

  • All user-attachments images downloaded successfully to .github/images/
  • All filenames are descriptive (no generic names or UUIDs)
  • All markdown files updated with relative paths for user-attachments images
  • Relative paths are correct (../images/ from .github/steps/)
  • No broken image links
  • Zero net new files added (only images in .github/images/ should be new)
  • Other external images (octodex, shields.io, etc.) remain as absolute URLs

6. Update start-exercise reusable workflow version

Update start-exercise reusable workflow that is used to v0.8.0 version which is the first release of exercise-toolkit that supports relative links.

Important: Only update the start-exercise version reference. Do not modify any other references to exercise-toolkit elsewhere in the repository.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: FidelusAleksander <63016446+FidelusAleksander@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate user-attachments images to local repository Migrate user-attachments images to local repository with relative paths Feb 6, 2026
@FidelusAleksander FidelusAleksander marked this pull request as ready for review February 6, 2026 12:57
Copilot AI review requested due to automatic review settings February 6, 2026 12:57
@FidelusAleksander FidelusAleksander requested a review from a team February 6, 2026 12:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates GitHub user-attachments images to local repository storage to improve content portability and ensure images remain accessible independent of external hosting. The migration includes downloading images with descriptive filenames and updating all markdown references to use relative paths.

Changes:

  • Downloaded 12 images from GitHub user-attachments to .github/images/ directory with descriptive kebab-case filenames
  • Updated 14 image references across 4 markdown files in .github/steps/ to use relative paths (../images/)
  • Updated start-exercise workflow to v0.8.0 (first version supporting relative image paths) while intentionally preserving other exercise-toolkit references at v0.5.0

Reviewed changes

Copilot reviewed 5 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/0-start-exercise.yml Updated start-exercise workflow reference to v0.8.0 to support relative image paths
.github/steps/1-first-codespace.md Migrated 4 image references to local relative paths
.github/steps/2-custom-image.md Migrated 1 image reference to local relative path
.github/steps/3-customize-codespace.md Migrated 7 image references to local relative paths
.github/steps/4-use-codespace.md Migrated 2 image references to local relative paths
.github/images/*.png (12 files) Added locally-hosted images with descriptive kebab-case filenames

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants