Google Drive: Open Direct Image from /view
This userscript adds a small floating “Open Image” button on Google Drive’s file preview pages (URLs ending in /view).
When viewing an image file, click the button to open the actual full-size image URL (e.g., the =s2560-rw-v1 link) in a new tab — perfect for saving, copying, or using the image directly.
✨ Features
Works on all Drive /view URLs automatically.
Detects and opens the highest available resolution (=sXXXX-rw-v1).
Preserves Drive’s normal right-click and “Add Comment” behavior.
No unsafe DOM injection — Trusted Types compliant.
Extremely lightweight (under 3 KB).
🧠 How it works
The script watches for Drive file viewer URLs.
When detected, it fetches the /preview version of the page to extract the real image link.
Then it opens that link directly in a new tab via GM_openInTab().
💡 Usage
Install the script using Tampermonkey
.
Open any Google Drive image (ending in /view).
Click “Open Image” → the real image loads in a new tab.
🛠 Known limitations
Works for image files only (JPEG, PNG, WEBP, etc.).
Won’t help with PDFs or Docs/Sheets.
If your Drive has unusual sharing restrictions, the preview may not expose a public image URL.
📜 License: MIT
Author: 573dave2
Version: 1.3.0