User:Suyash.dwivedi/userscripts/AddDerivedFromTemplate

Wiki's Lazy Coders

Derived From Button

AddDerivedFromTemplate is a specialized user script for Wikimedia Commons designed to quickly add the This file was derived from: Category:Derivative versions template to a file's description. This helps maintain proper attribution and connection between original works and their derivatives by linking them within the file information.

Installation

To install this script, add the following line to your common.js page:

 // Add Derived From Template mw.loader.load('https://commons.wikimedia.org/wiki/User:Suyash.dwivedi/userscripts/AddDerivedFromTemplate.js?action=raw&ctype=text/javascript');

How to use

  • Navigate to the File: page that is a derivative of another work.
  • Locate the script's action button (usually in the "More" menu or as a tab depending on your skin).
  • A prompt will appear asking for the name of the original file.
  • Enter the filename (e.g., Example_Original.jpg) and confirm.
  • The script will automatically:

Features

  • Automated Template Insertion: No need to manually type the complex template syntax.
  • Smart Linking: Handles filenames correctly to ensure the link between the derivative and original is functional.
  • Standardized Documentation: Helps in the organization of "Category:Derived from..." and related maintenance structures.
  • Efficiency: Streamlines the post-upload documentation process for remixers and editors.
Created by Suyash Dwivedi | Updated on: 8 January 2026
Category:User scripts#AddDerivedFromTemplate Category:Wikimedia Commons tools#AddDerivedFromTemplate
Category:Derivative versions Category:User scripts Category:Wikimedia Commons tools