Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  














Template:File extension






العربية
Slovenščina
 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
Wikisource
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 



Outputs the file extension of the filename indicated by parameter {{{1}}}. In the File: namespace, this parameter defaults to {{PAGENAME}}. In all other namespaces, the default output is an empty string. Any uppercase letters in the file extension are changed to lowercase.

Usage

Input Output Notes
{{file extension}} (empty string output because current page is in the Template: namespace)
{{file extension|Makefile}} (empty string output because specified filename has no extension)
{{file extension|I-35.svg}} svg Input filename is acceptable with or without File: namespace prefix.
{{file extension|File:George H. Sharpe.jpg}} jpg
{{file extension|UNMSM logo1.PNG}} png Uppercase is changed to lowercase
{{file extension|Wikimedia Logo.jpeg}} jpeg jpeg is not changed to jpg

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:File_extension&oldid=1069318200"

Categories: 
Templates based on the String Lua module
String manipulation templates
File namespace templates
Hidden category: 
Wikipedia semi-protected templates
 



This page was last edited on 1 February 2022, at 18:00 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki