GitHub Image Resizer

Convert GitHub markdown image uploads to HTML <img> tags with customizable width; supports drag-drop, paste, and attachment button uploads.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey, Greasemonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Userscripts.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een gebruikersscriptbeheerder nodig.

(Ik heb al een user script manager, laat me het downloaden!)

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

(Ik heb al een beheerder - laat me doorgaan met de installatie!)

Maker
miked49er
Dagelijks aantal installaties
0
Totaal aantal installaties
1
Beoordelingen
0 0 0
Versie
1.3
Gemaakt op
11-06-2025
Bijgewerkt op
11-06-2025
Grootte
4,73 KB
Licentie
MIT
Wordt toegepast op

📐 Tampermonkey GitHub Image Resizer

A Tampermonkey userscript that automatically converts uploaded image Markdown in GitHub Pull Requests into an HTML <img> tag with a customizable width.

This tool supports all GitHub image upload methods — including drag-and-drop, paste, and the attachment button — and ensures consistent visual layout for embedded images.


🚀 Features

  • 🖼️ Automatically converts this:

    ![alt text](https://github.com/user-attachments/assets/...)
    

    into:

    <img src="https://github.com/user-attachments/assets/..." alt="alt text" width="300">
    
  • ✅ Supports all image upload methods:

    • Drag-and-drop from desktop 💾
    • Clipboard paste 📋
    • Attachment button 📎
  • 🔁 Converts image Markdown to HTML <img> on-the-fly — no need to manually edit it.

  • ⚙️ Customizable width via Tampermonkey menu

  • 🧠 Intelligent detection even when GitHub silently updates the comment box after uploads


🧩 Installation

  1. Install Tampermonkey:

  2. Install the script:

    • From GreasyFork
    • Or manually:
    • Click the Tampermonkey icon → "Create a new script"
    • Paste contents of github-pr-image-to-html.user.js
    • Save

🛠 How to Set Custom Image Width

  1. Click the Tampermonkey icon in your browser.
  2. Open the menu for "GitHub PR Image to HTML (Custom Width)".
  3. Click "Set Image Width".
  4. Enter a value (e.g. 400) to apply that width (in pixels) to all converted images.

Your setting is stored and applied persistently across sessions.


🔒 Privacy

  • ✅ The script only runs on https://github.com/*
  • ❌ It does not send or store any data externally
  • ✅ Your preferences are stored locally in Tampermonkey

📤 Contributing

Pull requests are welcomed for:

  • Additional customizations (e.g. height, class, max-width)
  • Theme-aware image styling
  • Integration with GitHub Markdown preview styling

📄 License

MIT License — see LICENSE


🧪 Example

Before Upload:

Oredered Listocat

After Upload (Automatically):

Ordered Listocat