Description
Issue
The tool can only rotate JPG and JPEG files, the user also wants to rotate TIFF files. See also the original user request.
Task
We want to investigate if adding support for TIFF files would be an easy change. Otherwise we can not develop new features.
Findings
Summary: The code that the rotationbot is using for rotating PNG files can also be used for rotating TIFF files. Since the maintainer of the code also seems to be active, they could implement this feature on their own. We can bring the request to their attention. It might also be good to create some feature requests to solve the general image rotation issue in a more central way, since it is a well used feature and the bot is not completely dependable.
About the tool
- Talk page: https://commons.wikimedia.org/wiki/User_talk:Steinsplitter (Looks like this would be a good place for a feature request.)
- Summary of usage:
- Users can add Template:Rotate to their image to signal they want a rotation.
- Admins can configure the bot.
- The bot will go over all pages with the template, rotate it and remove the template usage.
- There is the gadget RotateLink that is based on the rotate bot and offers an user interface.
- Looks like the bot itself has not been running since 8.8.2025 and there are ~600 requests waiting for rotation. It seems to be a very well used feature.
The code
- Github: rotbot.php
- Command for rotating JPG/JPEG (see code):
- Command for rotating PNG and GIF (see code):
- ImageMagick () can also be used for TIFF files.
General context
- TIFF files might be a bit more difficult to rotate since the tend to be larger
- There is a ticket collection from 2011 T33504: Image rotation issues (tracking). This subticket T35186: Provide a well-performing API to rotate an image has 50 subscribers and WIP patches from 2023.
- Both VisualEditor and UploadWizard are lacking options to edit (rotate, crop, etc.) images during upload
Next steps
- Ask on the talk page of the bot if TIFF files could be added (feature request) with the hint on using the same command as PNG files ( by ImageMagick). --> https://commons.wikimedia.org/wiki/User_talk:Steinsplitter#Allow_TIFF_files
- Write feature request ticket for VisualEditor that would allow rotating images in VE (including TIFF files). --> New ticket: T402931: Allow to rotate image in VisualEditor's image dialog
- Improve feature request ticket for UploadWizard T106216 to include TIFF files. --> Left a comment T106216#11119149
- Update https://de.wikipedia.org/wiki/Wikipedia:Technische_W%C3%BCnsche/Reparaturhilfe#c:User:SteinsplitterBot/Rotatebot with findings and outcomes
Related Objects
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Tobi_WMDE_SW | T401674 Reparaturhilfe tasks in the Summer 2025 season | |||
| Resolved | thiemowmde | T401677 [Reparaturhilfe] Investigate Rotatebot |
- Mentioned In
- T402931: Allow to rotate image in VisualEditor's image dialog
T106216: Users and bots should be able to adjust image orientation (rotate images) during upload - Mentioned Here
- T402931: Allow to rotate image in VisualEditor's image dialog
T18274: Rotate an image inline using wikisyntax
T33504: Image rotation issues (tracking)
T35186: Provide a well-performing API to rotate an image
T87017: Implement a rotate page image view function for pages being viewed when editing in the Page Namespace.
T106216: Users and bots should be able to adjust image orientation (rotate images) during upload
Event Timeline
Some review notes:
- rotatebot's backend uses ExifTool which claims to support TIFF natively, so adding support should be a matter of adding the filetype to existing clauses.
- TIFF can be rotated by 90° increments by manipulating the tag so no bit arithmetic would be needed for these cases.
- UploadWizard and VisualEditor run on the MediaWiki app server which can be assumed to already have graphicsmagick (or imagemagick) configured (see https://www.mediawiki.org/wiki/Manual:Image_administration ), which can rotate any format of allowed image.
We noticed that the bot seems to have general issues:
https://commons.wikimedia.org/w/index.php?title=User:SteinsplitterBot/Rotatebot&diff=prev&oldid=1077399661
And that the maintainer stepped away from developing features.
https://commons.wikimedia.org/w/index.php?title=User_talk:Steinsplitter&diff=prev&oldid=773639354
It appears like the tool had support for TIFF, but that was removed in 2023 for unknown reasons: https://github.com/toollabs/Rotatebot/commit/c8792123
I currently don't see a reason why that was disabled. I made a pull request: https://github.com/toollabs/Rotatebot/pull/2
