GitHub Image Resizer

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

Yazar
miked49er
Günlük kurulumlar
0
Toplam kurulumlar
1
Değerlendirmeler
0 0 0
Versiyon
1.3
Oluşturulma
11.06.2025
Güncellenme
11.06.2025
Boyut
4,73 KB
Lisans
MIT
Geçerli

📐 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