Download images, videos, and GIFs from X/Twitter with one click, and save them with user ID and post ID in default settings. You can customize the filenames of downloaded files. On Android/iPhone, all attached media can be downloaded at once via a ZIP archive. Download history is synced with bookmarks. Additionally, you can optionally synchronize your download history online using the X/Twitter bookmark feature.
This script is a tool that allows you to download images, videos, and GIFs on X/Twitter with a single click.
Files are saved using the user ID and post ID in the filename. For multiple media files, on PC they are saved individually, while on mobile they are downloaded as a bulk ZIP file. (Videos are downloaded in the highest available quality and images in their original size.) You can customize the filenames of downloaded files by editing the generateFilename function in the code. Available elements for filenames are user ID, username, post ID, and post time. Download history is also saved automatically. Additionally, you can optionally synchronize your download history online using the X/Twitter bookmark feature.
The actual image of the download button is attached at the bottom of this page.
It works on both PC and mobile as long as you are using an up-to-date browser.
This script is based on the following two scripts.
・Twitter/X(web version)videos/4kPhotos/gif download.[limbopro](https://greasyfork.org/en/scripts/478651)
・Twitter Media Downloader(https://greasyfork.org/ja/scripts/423001)
✅ How to Fix:
ffmpeg -i input.mp4 -fflags +genpts output_fixed.mp4For more details, please refer to this discussion.
When a ZIP file containing multiple media files is downloaded, you can use our dedicated iPhone/iPad shortcut to easily extract and organize the media files. Please follow these steps:
From then on, running this shortcut will automatically extract and save the downloaded ZIP file.
※ The shortcut settings can be customized as needed. For detailed instructions, please refer to the explanation within the shortcut.
You can arbitrarily change the filename of downloaded files using user ID, username, post ID, and post time. To change the name, edit the generateFilename function in the code. You can also change the format of the post time. For details, please check the dayjs reference. Below are the default settings and other examples.
Default: Name using User ID and Post ID
return `${userId}_${postId}-${mediaTypeLabel}${index}.${ext}`;
Example 1: Name using User ID, Post ID, and Post Time (YYYYMMDD_HHmmss format)
const formattedPostTime = dayjs(postTime).format('YYYYMMDD_HHmmss');
return `${userId}_${postId}-${formattedPostTime}-${mediaTypeLabel}${index}.${ext}`;
Example 2: Name using Username, Post ID, and Post Date (YYYYMMDD format)
const formattedPostTime = dayjs(postTime).format('YYYYMMDD');
return `${userName}_${postId}-${formattedPostTime}-${mediaTypeLabel}${index}.${ext}`;
This script includes an optional feature to synchronize your download history online using the X/Twitter bookmark function.
enableDownloadHistorykSync in the code from false to true.false), this feature is disabled. The download history is not synced online and is only stored locally within your browser's storage (IndexedDB).
A: Please try reloading the page, clearing your cache, or ensuring you are using the latest version of your browser.
A: On iPhone/iPad, you can extract them using the provided shortcut or a file management app. On Android, you can use the built-in file manager to extract ZIP files.
A: Please check your network environment or note that there may be changes in X/Twitter's specifications. Try again after some time.
A: If there is only one media file, it will be downloaded individually; if there are multiple files, they will be downloaded either as a bulk ZIP file or individually depending on the OS.
A: You can edit it with a third-party app. For example, you can use the app called Documents (link).
A: Please delete the DownloadHistoryDB in IndexedDB using your browser's developer tools. If you cannot do that, such as on mobile browsers, please clear site data from your browser's settings.
A: Please report them via the feedback section on this page.
This script is released under the MIT License.
For details, please review the MIT License.
© 2025 Azuki. All rights reserved.