This repository hosts an Experimental Code Column for Glide. It automatically generates a thumbnail image from a wide variety of video and image URLs.
It is designed to be a "set it and forget it" solution that handles different platforms and file types intelligently.
- YouTube: Supports standard URLs, Shorts, Embeds, and
youtu.belinks. - Vimeo: Automatically fetches thumbnails via the OEmbed API.
- Loom: Automatically fetches thumbnails via the OEmbed API.
- Google Drive: Generates high-quality thumbnails for Drive videos and images (requires "Anyone with the link" access).
- Hosted Files: Generates screenshots for direct video files (
.mp4,.mov,.webm) using the browser's DOM (requires CORS support on the host server). - Direct Images: If the URL is already an image (
.jpg,.png, etc.), it passes it through unchanged.
-
In your Glide Data Editor, add a new column.
-
Select Experimental Code.
-
Paste the following URL into the column configuration:
https://rpetitto.github.io/mediathumbnail/Important: You must include the trailing slash
/.
Simply map the Video URL parameter to a column in your Glide table containing the links you want to process. The column will output a URL string pointing to the thumbnail image.
This project uses the web-based Experimental Code structure required by Glide:
glide.json: The manifest definition for Glide.index.html: The entry point for the column's iframe.driver.js: Handles communication between Glide and the custom logic.function.js: The core logic that parses URLs and generates thumbnails.
- Added: Google Drive support. Now detects
drive.google.comanddocs.google.comlinks and retrieves the high-res thumbnail via the Drive API.
- Fix: Refactored project structure to the 4-file setup (
index.html,driver.js,function.js,glide.json). - Fix: Resolved infinite loading spinner issue caused by previous headless module approach.
- Update: Switched logic to use
window.functionformat for compatibility with the Glide web driver.
- Added: Vimeo support using the public OEmbed API.