Copy External Images as Base64 Chrome Extension

A Chrome extension that automatically converts external images to Base64 format when copying content to your clipboard, ensuring images remain accessible even when offline or when original URLs become unavailable.
π Features
- Smart Image Detection: Automatically identifies external images in your selected content
- Seamless Conversion: Converts HTTP/HTTPS images to embedded Base64 data URLs
- Dual Context Support: Works with both text selections and direct image right-clicks
- Clipboard Integration: Maintains original formatting while embedding images
- Offline Compatibility: Copied content with images works without internet connection
- Error Handling: Gracefully handles failed image loads
- Minimal Permissions: Only requests necessary permissions for functionality
π How to Use
For Text Selections with Images:
- Select content containing external images on any webpage
- Right-click and choose βCopy with external images as Base64β
- Paste anywhere - images are now embedded and will always display
For Individual Images:
- Right-click directly on an external image
- Choose βCopy with external images as Base64β
- Paste the converted image with embedded Base64 data
π Installation
From Chrome Web Store (Recommended)
- Visit the Chrome Web Store
- Click βAdd to Chromeβ
- Confirm installation
Manual Installation (Developer Mode)
- Download or clone this repository
- Open Chrome and navigate to
chrome://extensions/
- Enable βDeveloper modeβ in the top right
- Click βLoad unpackedβ and select the extension directory
- The extension will appear in your extensions list
π File Structure
Copy External Image as Base64/
βββ manifest.json # Extension manifest (Manifest V3)
βββ background.js # Service worker with main logic
βββ icons/ # Extension icons
β βββ icon16.png
β βββ icon48.png
β βββ icon128.png
βββ README.md # This file
βββ privacy-policy.md # Privacy policy
π§ Technical Details
Permissions Used:
contextMenus: Creates right-click menu option
scripting: Executes conversion script on current webpage
activeTab: Accesses current page content to identify and convert images
- Input: External images (HTTP/HTTPS URLs)
- Output: Base64 data URLs (maintains original format: PNG, JPEG, GIF, etc.)
- Content: HTML selections with embedded images
Browser Compatibility:
- Chrome 88+ (Manifest V3 support)
- Chromium-based browsers with Manifest V3 support
π Privacy & Security
- Local Processing: All operations are performed locally in your browser
- No Data Collection: Extension does not collect, store, or transmit personal data
- No External Servers: No communication with external servers except to fetch images for conversion
- Temporary Processing: Images are only held in memory during conversion
- Minimal Permissions: Only requests necessary permissions for functionality
See Privacy Policy for detailed information.
π Troubleshooting
Images Not Converting?
- Ensure the image URL is accessible (not behind authentication)
- Check browser console for error messages
- Verify the image is from HTTP/HTTPS source (not data: URLs)
- Make sure youβre right-clicking on selectable content or images
- Extension only works on web pages (not Chrome internal pages)
Clipboard Issues?
- Grant clipboard permissions when prompted by browser
- Ensure youβre using a supported browser
- Try refreshing the page and attempting again
π€ Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
Development Setup:
- Clone the repository
- Load the extension in developer mode
- Make your changes
- Test thoroughly
- Submit a pull request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Chrome Extensions API documentation
- Modern clipboard API implementation
- Base64 encoding/FileReader API
π Support
If you encounter any issues or have questions:
- Open an issue on GitHub
- Contact: josefkainz1992@gmail.com
Perfect for:
- Saving web content for offline viewing
- Creating self-contained documentation
- Sharing content without broken image links
- Archiving web pages with images
- Email newsletters with embedded images
- Documentation with consistent image display
Made with β€οΈ for better web content management