Commons talk:CropTool
Lossless mode no longer working?
@Danmichaelo, is lossless mode still working. I used to get messages that the crop size had been adjusted because I wasn't starting on a multiple of 8 or 16, but this has gone away. Similarly, there's a bug report on github (#170) reporting that files that should be uncroppable in lossless mode are now working, but produce the same files as if they were in precise mode. Is the tool silently falling back to precise when lossless doesn't work (which would be undesirable), or is something else going on here? Perhaps a bug introduced in the September 2020 refactoring? Ahecht (TALK
PAGE) 14:59, 15 June 2022 (UTC)
- Looking into the code more, it seems like the September 2020 refactor fundamentally broke things. The various types of crop were broken out into subclasses (for example, lossless Jpeg cropping was broken out into JpegFile and Gif cropping to GifFile), but as far as I can tell the only subclasses that are actually being called out by the program in FileRepository.php are TiffFile, DjvuFile, PdfFile, and SvgFile, all of which return errors instead of actually working. All other file types are being handled by the generic imagemagick call in File.php.
- This is why lossless crops are no longer lossless, Gif files say they are being cropped with precise or lossless mode instead of "gif mode", and TIFFs, PDFs, and DJVUs no longer work.
- If these issues aren't easy to resolve, perhaps to the tool should be rolled back to 1.4 (before the refactoring). Ahecht (TALK
PAGE) 14:18, 17 June 2022 (UTC) - just confirming this issue persists 2023-01.--RZuo (talk) 11:53, 15 January 2023 (UTC)
- Since about 9-2021 Danmichaelo's only contributions have been edits to wikidata and some edits in norwegian and finnish wikipedia about some meta-topics (bot problems, ...). I seem to remember that them was unhappy with a decission at english wikipedia. That leaves two ways of action: Appease them to return to wikipedia, or find a new maintainer for croptool. Just waiting woll not help. C.Suthorn (talk) 15:34, 15 January 2023 (UTC)
- sigh :/
- there were a few commits https://github.com/danmichaelo/croptool/commits/master .
- i know someone might have to take over, but i reposted this thread because this is a major issue which should not be archived until it's resolved. RZuo (talk) 18:25, 15 January 2023 (UTC)
- Since about 9-2021 Danmichaelo's only contributions have been edits to wikidata and some edits in norwegian and finnish wikipedia about some meta-topics (bot problems, ...). I seem to remember that them was unhappy with a decission at english wikipedia. That leaves two ways of action: Appease them to return to wikipedia, or find a new maintainer for croptool. Just waiting woll not help. C.Suthorn (talk) 15:34, 15 January 2023 (UTC)
- i think, with https://github.com/danmichaelo/croptool/pull/182 merged 2 days ago, lossless mode has now returned. i just tried previewing random crops in lossless mode and they were now being augmented to the left and the top again.
- thx a lot @Danmichaelo, @Christoph Jauera (WMDE) and @TMg! RZuo (talk) 14:35, 20 February 2024 (UTC)
- User:Danmichaelo Crop from .svg files still not working. Was this supposed to fix it? Doc James (talk · contribs · email) 15:34, 23 April 2024 (UTC)
- Trying to crop File:Johnson and Johnson Marketing Ad Kilmer Opera House Pharmacy 1888.jpg went [Error] undefined when using lossless mode. Had to use precise mode. - Alexis Jazz ping plz 11:43, 11 January 2025 (UTC)
Similar to Croptool tool to change exposition
Is there any Similar to Croptool tool to change exposition? Alex Blokha (talk) 23:06, 18 February 2025 (UTC)
- @Alex Blokha: not sure what you mean by "exposition". Maybe lightness ("exposure", though technically "exposure" happens entirely at the time you snap the shutter, so exposure as such cannot be changed)? Or do you mean something else? - Jmabel ! talk 00:04, 19 February 2025 (UTC)
- Yes, I mean lightness. I need to make image more light or more dark. Alex Blokha (talk) 01:09, 19 February 2025 (UTC), and a good tool for that takes a good bit of work; it's tricky to do client-side in a browser window. (Theoretically you could do it with JavaScript and HTML Canvas.) I'd suggest that if you need to do that, download a full-res copy to your own PC and do it there. The
Colors > Curvestool in GIMP does this well and flexibly (e.g. lets you keep highlight as they are while lightening other ranges). - Jmabel ! talk 05:46, 19 February 2025 (UTC)- User:Alex Blokha Yes we built this Doc James (talk · contribs · email) 16:43, 27 March 2025 (UTC)
- @Doc James: I don't see anything there that looks like it has the requested capability. It looks to me like strictly a tool for adding text annotations to an image, not for making it brighter or darker. Am I missing something? - Jmabel ! talk 01:47, 29 March 2025 (UTC)
- Under "filters" bottom right and then you can move the brightness toggle. You have to select the square box to the left first. Doc James (talk · contribs · email) 19:35, 29 March 2025 (UTC)
- I see. That lets you change brightness over the whole image, and might deal well with straight-out overexposure or underexposure. However, in my experience, that's not terribly useful. You really want at least to be able to adjust shadows, midrange, and highlights independently, and probably the different color channels, and ideally have something like the GIMP "Curves" tool. So, yes, there are some cases that would cover, but I suspect it is a definite minority. If you want a good example of where it won't help, try looking at File:Pfeiffer Big Sur State Park - tree round 01.jpg. - Jmabel ! talk 22:29, 29 March 2025 (UTC)
- Under "filters" bottom right and then you can move the brightness toggle. You have to select the square box to the left first. Doc James (talk · contribs · email) 19:35, 29 March 2025 (UTC)
- How can I put it to sidebar like Croptool? Alex Blokha (talk) 20:24, 26 May 2025 (UTC)
- Ок, I've written script for sidebar by myself, using LLM
- // <nowiki>
- mw.loader.using(['mediawiki.util'], function () {
- /**
- * Check if we are in the "File" namespace (Namespace ID 6).
- * If not, the script skips execution.
- */
- if (mw.config.get('wgNamespaceNumber') === 6) {
- // Get the full page name (e.g., File:Kkpk_truck_in_Dnipro.png)
- var pageName = mw.config.get('wgPageName');
- // Construct the URL for the ISA Tool
- // encodeURIComponent ensures special characters are handled correctly
- var targetUrl = 'https://image-annotation-tool.wmcloud.org/?file=' + encodeURIComponent(pageName);
- // Add the link to the sidebar toolbox (Portlet Link)
- mw.util.addPortletLink(
- 'p-tb', // ID of the "Tools" portlet (Toolbox)
- targetUrl, // The target URL
- 'ISA Tool', // Link text to display
- 't-isa-tool', // Unique ID for the HTML element
- 'Open this file in the Image Annotation Tool', // Tooltip text (on hover)
- null, // Access key (can be null)
- null // Next node (null = append to the end of the list)
- );
- }
- });
- // </nowiki> Alex Blokha (talk) 23:38, 8 December 2025 (UTC)
- Have code here User:Doc James/common.js Doc James (talk · contribs · email)
- @Doc James: I don't see anything there that looks like it has the requested capability. It looks to me like strictly a tool for adding text annotations to an image, not for making it brighter or darker. Am I missing something? - Jmabel ! talk 01:47, 29 March 2025 (UTC)
- User:Alex Blokha Yes we built this Doc James (talk · contribs · email) 16:43, 27 March 2025 (UTC)
- Yes, I mean lightness. I need to make image more light or more dark. Alex Blokha (talk) 01:09, 19 February 2025 (UTC), and a good tool for that takes a good bit of work; it's tricky to do client-side in a browser window. (Theoretically you could do it with JavaScript and HTML Canvas.) I'd suggest that if you need to do that, download a full-res copy to your own PC and do it there. The
Broken templates in cropped images
Hi, is anyone working on this issue? This is a consistent problem in all cropped files (for example, File:Andrees Handatlas - Haiti und Puerto Rico.jpg) and I don't think it is my responsability as the one who does the cropping, to fix the template in the resulting image, especially since the github people purposefully programmed it that way to discourage usage of the {{book}}-template. --Enyavar (talk) 10:28, 24 July 2025 (UTC)
- @Doc James: can this issue also be looked into please? I work with PDF and DJVU files a lot of times and the resulting image post crop has broken templates. I've had to manually fix those.
- I would suggest - Crops from files using the Book template should use the basic Information template and an optional field to enter the new description (especially when uploading a new image) would be great. PDF and DJVU templates on the result file should also be removed. Ciridae (talk) 13:13, 6 January 2026 (UTC)
- So basically if the starting image uses the book template than the final image should use the book template? User:Bawolff can we add this functionality per the bug report? Doc James (talk · contribs · email) 14:24, 6 January 2026 (UTC)
- @Doc James: No, even if the starting file, PDF or DJVU, uses the Book template, the final cropped image should use the Information template by default because the final image will never be a book but an image file. Also, a PDF or DJVU template is added to books uploaded from Internet Archive (and others) which should also be removed. Ciridae (talk) 13:57, 8 January 2026 (UTC)
- So basically if the starting image uses the book template than the final image should use the book template? User:Bawolff can we add this functionality per the bug report? Doc James (talk · contribs · email) 14:24, 6 January 2026 (UTC)
- @Enyavar The tool should no longer break templates when removing {{Book}}. However I gather that's not fully what is wanted here. Its not fully clear to me how the tool should act when a book template is present, since for example, File:Andrees Handatlas - Haiti und Puerto Rico.jpg does not have all the fields of the information template. Currently the tool can only delete templates but not interpret them, so having it convert {{Book}} to {{Information}} might be quite a bit of effort. Bawolff (talk) 05:16, 6 February 2026 (UTC)
- @Bawolff: Yes, converting Book template to Information template is what we're looking for. Also, the PDF or DJVU templates should also be removed, if present. Ciridae (talk) 06:42, 20 February 2026 (UTC)
- Hi, I just noticed this conversation after posting a comment on Issue #2. I've been slowly trying to clean up Category:Pages using Information template with parsing errors, but new entries are added to that category by the tool somewhat regularly. A recent example I fixed was File:Le Pâtissier Royal Belge - 1922 (page 221 crop).jpg (diff). There are 6 or 7 more crops I plan to fix from yesterday. More examples can be seen in my recent contributions.
- While I'm not 100% familiar with the rationale of preferring the Information template over the Book template over such crops, my preference would be that the tool is able to either migrate the template in its entirety or not at all. If it doesn't then it'll end up in Category:Media missing infobox template which is not great but better than having a broken template IMO. If the cause of what's breaking these templates could be identified, I'd be much obliged. --Stux (talk) 15:14, 4 March 2026 (UTC)
- Just as a note, that example is with croptool1 not croptool2. Croptool2 should now take the do not migrate the template at all approach currently. Bawolff (talk) 15:34, 4 March 2026 (UTC)
- @Bawolff: , ah that makes more sense. Thank you for clarifying that. I had not noticed the tag that says "CropTool 1.5". I'm surprised that's still around. I thought the only way to use the current croptool was using the Gadget? How is the old version still accessible? And is there a reason it's still popular? Are the features and/or behavior that different? I'm still seeing new edits with this version producing images with broken templates. So I'm wondering what incentives there might be to using the old tool or switching to the new one. --Stux (talk) 18:55, 7 March 2026 (UTC)
- Basically the original author wasn't responding so i forked the tool and called it croptool2. The original is still out there. You can use it by going directly to its url. Possibly some people use their own userscripts for the integration instead of the gadget, which may point to the other version. Bawolff (talk) 19:09, 7 March 2026 (UTC)
- @Bawolff: , ah that makes more sense. Thank you for clarifying that. I had not noticed the tag that says "CropTool 1.5". I'm surprised that's still around. I thought the only way to use the current croptool was using the Gadget? How is the old version still accessible? And is there a reason it's still popular? Are the features and/or behavior that different? I'm still seeing new edits with this version producing images with broken templates. So I'm wondering what incentives there might be to using the old tool or switching to the new one. --Stux (talk) 18:55, 7 March 2026 (UTC)
- Just as a note, that example is with croptool1 not croptool2. Croptool2 should now take the do not migrate the template at all approach currently. Bawolff (talk) 15:34, 4 March 2026 (UTC)
- @Bawolff: Yes, converting Book template to Information template is what we're looking for. Also, the PDF or DJVU templates should also be removed, if present. Ciridae (talk) 06:42, 20 February 2026 (UTC)
CropTool2
We at Wiki Project Med have been funding improvements to the CropTool and have forked it to create . For those who wish to use this new version (which handles SVGs for example) turn off the current croptool in your preferences and add the following to your personal .js as seen here User:Doc_James/vector-2022.js Doc James (talk · contribs · email) 16:19, 9 October 2025 (UTC)
- @Doc James: is there any reason this should not simply supersede the current CropTool? - Jmabel ! talk 01:18, 10 October 2025 (UTC)
- We would be fine with that. We forked it as the current maintainer of CropTool is not really responsive. We plan to continue funding the maintenance of this version.
- We are currently working on improving its handling of large files. But are open to further suggestions. Doc James (talk · contribs · email) 01:48, 10 October 2025 (UTC)
- @Doc James: If the current maintainer is not responsive, you could propose switching over at COM:VPP, with a ping to the unresponsive maintainer and a link from COM:VPT. - Jmabel ! talk 13:42, 10 October 2025 (UTC)
- For what it's worth, you can't really usurp/supersede the original tool per the right to fork policy. However, for all intents and purposes, folks should be able to use CropTool2 over the original CropTool. Particularly, a interface-administrator should update MediaWiki:Gadget-CropTool.js. Sohom (talk) 16:21, 10 October 2025 (UTC)
- @Doc James: If the current maintainer is not responsive, you could propose switching over at COM:VPP, with a ping to the unresponsive maintainer and a link from COM:VPT. - Jmabel ! talk 13:42, 10 October 2025 (UTC)
We just added another improvement. CropTool2 now handles images 10 fold larger than CropTool. For example it will work with this. Doc James (talk · contribs · email) 23:20, 14 October 2025 (UTC)
- @Doc James, could the tool provide an option to restrict the crop to the image area when using arbitrary rotation in precise mode? 𝟙𝟤𝟯𝟺𝐪𝑤𝒆𝓇𝟷𝟮𝟥𝟜𝓺𝔴𝕖𝖗𝟰 (𝗍𝗮𝘭𝙠) 00:24, 17 October 2025 (UTC)
- @Doc James many thanks for your team to take the tool over and improve on it.
- have you guys carried the old issues https://github.com/danmichaelo/croptool/issues over? technically many of them probably are still applicable and need to be addressed? RoyZuo (talk) 19:37, 8 March 2026 (UTC)
- Thanks. Someone needs to go through the list and see which are still issues. This for example appears to work now.
- I do not have the ability to close issues that are solved as this is under User:Danmichaelo. We should probably either convince them to give us ability to manage the bugs or create a new bug list. Doc James (talk · contribs · email) 21:26, 8 March 2026 (UTC)
- @Doc James refiling issues under croptool2 like https://github.com/wpmed/croptool2/issues/3 , is it ok?
- after all, issues resolved in croptool2 dont apply to croptool1 so i think it's better not to close croptool1 issues like that. RoyZuo (talk) 09:54, 9 March 2026 (UTC)
CropTool2 is now the version offered as a gadget. - Jmabel ! talk 23:12, 14 December 2025 (UTC)
Cursor hardly visible
The grey cursor is hardly visible out of the cropped area, i cannot attach a screenshot, because the screenshots don't show the cursor as I see it. The problem is, that inside the crop box, I see four-way arrow. Outside the box, the grey crosshair is shown, but grey on grey background isn't visible. Probably only Win11-related... I don't have an account at GitHub and I don't want it, so I report it here. — Draceane talkcontrib. 09:29, 21 November 2025 (UTC)
Problem with DJVU
Hello, I can't manage to use croptool for DJVU files on commons (with this example). It gives me the following message : (Command not found: "/usr/local/bin/magick '/workspace/public_html/files/303803465aae314a3c2982800f9418cc1da1dc9c.djvu.page1.jpg.tiff' '/workspace/public_html/files/303803465aae314a3c2982800f9418cc1da1dc9c.djvu.page1.jpg' 2>&1"). Someone can help me ? I already use it for this type of use, but now it doesn't work. Olivier LPB (talk) 12:45, 22 December 2025 (UTC)
- I think that i found my problem, the link with the widget go to "croptool2".toolforge... and not "croptool", i change the ref in the navigation barr and now it's work. Olivier LPB (talk) 16:09, 22 December 2025 (UTC)
Comment, I also got this error in CropTool2 for DjVu files. However, as mentioned above, the error only exist for CropTool2, but not the original CropTool. Thanks. Tvpuppy (talk) 18:53, 22 December 2025 (UTC)
Done this should be fixed now Bawolff (talk) 21:49, 4 January 2026 (UTC)
Bug Report
When cropping, CropTool does no longer copy the file description of the original file into the new file. This needs to be fixed urgently.
For examples please see:
File:Encyclopaedia Britannica Vol. 18 1885 - Pau.jpg
This file was initially tagged by AntiCompositeBot as no license (User:AntiCompositeBot/NoLicense/tag) - CHALLENGE: I extracted this file from a page of EB, printed 1885, meaning that it is PD-old Enyavar (talk) 10:16, 20 February 2026 (UTC)
Kept: fixed file tagging. ~TheImaCow (talk) 15:37, 21 June 2026 (UTC)
File:Encyclopaedia Britannica Vol. 18 1885 - Ostend.jpg
This file was initially tagged by AntiCompositeBot as no license (User:AntiCompositeBot/NoLicense/tag) - CHALLENGE: I extracted this file from a page of EB, printed 1885, meaning that it is PD-old Enyavar (talk) 10:16, 20 February 2026 (UTC)
Kept: fixed file tagging. ~TheImaCow (talk) 15:37, 21 June 2026 (UTC)
File:Encyclopaedia Britannica Vol. 18 1885 - Ottawa.jpg
This file was initially tagged by AntiCompositeBot as no license (User:AntiCompositeBot/NoLicense/tag) - CHALLENGE: I extracted this file from a page of EB, printed 1885, meaning that it is PD-old Enyavar (talk) 10:16, 20 February 2026 (UTC)
File:Encyclopaedia Britannica Vol. 18 1885 - Oxford.jpg
This file was initially tagged by AntiCompositeBot as no license (User:AntiCompositeBot/NoLicense/tag) - CHALLENGE: I extracted this file from a page of EB, printed 1885, meaning that it is PD-old Enyavar (talk) 10:16, 20 February 2026 (UTC)
Kept: fixed file tagging. ~TheImaCow (talk) 15:33, 21 June 2026 (UTC)
File:Encyclopaedia Britannica Vol. 18 1885 - Padua.jpg
This file was initially tagged by AntiCompositeBot as no license (User:AntiCompositeBot/NoLicense/tag) - CHALLENGE: I extracted this file from a page of EB, printed 1885, meaning that it is PD-old Enyavar (talk) 10:16, 20 February 2026 (UTC)
Kept: fixed file tagging. ~TheImaCow (talk) 15:33, 21 June 2026 (UTC)
File:Encyclopaedia Britannica Vol. 18 1885 - Paisley.jpg
This file was initially tagged by AntiCompositeBot as no license (User:AntiCompositeBot/NoLicense/tag) - CHALLENGE: I extracted this file from a page of EB, printed 1885, meaning that it is PD-old Enyavar (talk) 10:16, 20 February 2026 (UTC)
Kept: fixed file tagging. ~TheImaCow (talk) 15:37, 21 June 2026 (UTC)
File:Encyclopaedia Britannica Vol. 18 1885 - Paris 1380.jpg
This file was initially tagged by AntiCompositeBot as no license (User:AntiCompositeBot/NoLicense/tag) - CHALLENGE: I extracted this file from a page of EB, printed 1885, meaning that it is PD-old Enyavar (talk) 10:16, 20 February 2026 (UTC)
Kept: fixed file tagging. ~TheImaCow (talk) 15:37, 21 June 2026 (UTC)
File:Encyclopaedia Britannica Vol. 18 1885 - Paris 1615.jpg
This file was initially tagged by AntiCompositeBot as no license (User:AntiCompositeBot/NoLicense/tag) - CHALLENGE: I extracted this file from a page of EB, printed 1885, meaning that it is PD-old Enyavar (talk) 10:16, 20 February 2026 (UTC)
Kept: fixed file tagging. ~TheImaCow (talk) 15:37, 21 June 2026 (UTC)
Thanks in advance. --Enyavar (talk) 10:27, 20 February 2026 (UTC)
- Thanks. Will ask User:Bawolff to fix. Doc James (talk · contribs · email) 11:27, 20 February 2026 (UTC)
- Clearly related to #Broken templates in cropped images and removing {{Book}}. It's obvious that the current state is not a correct solution. - Jmabel ! talk 19:08, 20 February 2026 (UTC)
- Ok, book template is no longer being removed (e.g. File:Charles Lloyd by John Constable (page 276 crop).jpg). Bawolff (talk) 18:33, 22 February 2026 (UTC)
- For the longer term, we can probably do better than the status quo, but i dont think there is any solution where users never have to update file description pages after cropping in all cases. Bawolff (talk) 18:36, 22 February 2026 (UTC)
- I usually set new categories after cropping, so yes, I see it's necessary to manually update the page because cropped content is not the original content.
- I just don't think that it is really feasible to tell users "return to the original file; copy out the whole description page; return to the cropped file; input the description you copied; carefully study the various used description templates to change the file description to match the new content; oh and be careful to not disturb the extraction-templates that link the files together."
- Thanks for preserving the book template in the future, I hope we can fix the broken templates from images that were cropped in the meantime. --Enyavar (talk) 14:11, 24 February 2026 (UTC)
- For the longer term, we can probably do better than the status quo, but i dont think there is any solution where users never have to update file description pages after cropping in all cases. Bawolff (talk) 18:36, 22 February 2026 (UTC)
- Ok, book template is no longer being removed (e.g. File:Charles Lloyd by John Constable (page 276 crop).jpg). Bawolff (talk) 18:33, 22 February 2026 (UTC)
- Clearly related to #Broken templates in cropped images and removing {{Book}}. It's obvious that the current state is not a correct solution. - Jmabel ! talk 19:08, 20 February 2026 (UTC)
Not Working on Large PNG files
I get [Error] undefined at the preview stage on large png files like https://commons.wikimedia.org/wiki/File:Whistler_-_Symphony_in_Blue_and_Pink,_ca._1868,_F1903.179a-b.png I get no error for similarly sized jpg files. Surajr7 (talk) 04:28, 4 March 2026 (UTC)
Isn't showing up
So apparently I have to recrop photos using this tool but the tool isn't showing up like it says it should. So now what? MoonsMoon MoonsMoon 00:16, 5 March 2026 (UTC)
- It is now right upper corner under the tools dropdown. Doc James (talk · contribs · email) 00:32, 5 March 2026 (UTC)
- Nope, not there either. And when I use the other outside link thing it says to try, it picks and chooses when it wants to work. MoonsMoon MoonsMoon 00:35, 5 March 2026 (UTC)
- @MoonsMoon Have you check if you have enabled "CropTool" in your preferences? It should be enabled after you clicked "Activate CropTool!" in Commons:CropTool#Setup. Thanks. Tvpuppy (talk) 01:44, 5 March 2026 (UTC)
- Additionally, if you open the web developer console (f12), are there any errors? Bawolff (talk) 04:38, 16 March 2026 (UTC)
- It still never showed up. I have to go to the tool's page to do it. But now when I crop a photo, it doesn't change the cropped file's name so it still shows up as the original. Its really very stupid. This is the cropped version - https://commons.wikimedia.org/wiki/File:Khmer_silks.jpg
- But because the stupid thing suddenly won't change the file name, I can't replace it on the page. It still shows up as not cropped - https://en.wikipedia.org/wiki/Sampot#Textiles MoonsMoon MoonsMoon 04:09, 28 March 2026 (UTC)
- @MoonsMoon: It looks to me like you have done an inappropriate overwrite of File:Khmer clothing (female and male).jpg (twice, actually), probably by choosing "Overwrite" in the Croptool preview, rather than "Upload as new file". It no longer has any relation to its title. It's your upload, so I'm not reverting it (you should feel more than free to do so), but it is as if you are vandalizing your own file.
- Also, this file has no categories.
- BTW, did you try what Bawolff suggested about the web developer console? Were there any possibly related errors? (In my experience, there are almost always some errors in the console; you made no mention of what you saw.) And using the "Inspector", does the string "⌗ CropTool" show up anywhere in the HTML? - Jmabel ! talk 05:08, 28 March 2026 (UTC)
- Additionally, if you open the web developer console (f12), are there any errors? Bawolff (talk) 04:38, 16 March 2026 (UTC)
- I am having this exact same issue. The tool doesn't appear under the tools dropdown, and when i use the "Alternative: go to tool forge", it keeps displaying an error message when i input the commons file i am trying to crop. Ifedohlapo (talk) 10:18, 6 March 2026 (UTC)
- @Ifedohlapo: What error message? — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 11:00, 6 March 2026 (UTC)
- It says "Unauthorized" Even though I have gone through the authorization process, and it shows Authorized at the top right corner Ifedohlapo (talk) 15:06, 6 March 2026 (UTC)
- I have it activated via this https://commons.wikimedia.org/wiki/User:Doc_James/vector-2022.js without selecting anything under preferences. Doc James (talk · contribs · email) 21:33, 8 March 2026 (UTC)
- It says "Unauthorized" Even though I have gone through the authorization process, and it shows Authorized at the top right corner Ifedohlapo (talk) 15:06, 6 March 2026 (UTC)
- @Ifedohlapo: What error message? — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 11:00, 6 March 2026 (UTC)
- @MoonsMoon Have you check if you have enabled "CropTool" in your preferences? It should be enabled after you clicked "Activate CropTool!" in Commons:CropTool#Setup. Thanks. Tvpuppy (talk) 01:44, 5 March 2026 (UTC)
- Nope, not there either. And when I use the other outside link thing it says to try, it picks and chooses when it wants to work. MoonsMoon MoonsMoon 00:35, 5 March 2026 (UTC)
Crop tool not bringing across file information
Hi. When undertaking this crop, it did not populate the new file with the original file's information and Flickr license. It only populated with the "Extracted from" template. The license was added manually here, otherwise the file would have been deleted. Has something changed with how the crop tool works? I have used it before where it has worked as intended – see here. Thanks. DaHuzyBru (talk) 04:50, 13 March 2026 (UTC)
- Thanks, we will look into this. User:Bawolff. Doc James (talk · contribs · email) 06:58, 13 March 2026 (UTC)
Comment, I also came across the same problem with this crop, which the file information and license templates were not copied from the source image. Thanks. Tvpuppy (talk) 18:19, 2 April 2026 (UTC)- Special:Permalink/1192987449 if this isn't example creep yet Queen of Hearts (talk) 16:15, 7 April 2026 (UTC)
Bug: CT logs me out
I have just successfully used CropTool to make an image from the first page of File:Report On The Derailment which occurred on 23rd January 1955 at Sutton Coldfield.pdf; but if I try to use it on pages 21 or 22 of that work (very large plates), if hangs, and I am logged out (from the tool not Commons). Can anyone advise? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:42, 13 March 2026 (UTC)
- @Pigsonthewing: The timeout probably needs to be tweaked. Can you do it otherwise using another tool from Commons:Extracting images from PDF#Extracting images from PDF? — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 13:10, 13 March 2026 (UTC)
- Yes, I did the job on a downloaded version on my machine.
- But why does a timeout log me out, rather than just returning an error message? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:14, 13 March 2026 (UTC)
- @Pigsonthewing: The last version I heard on a different platform was to save limited quantities of sessions or sockets for only those users actively using them, preserving availability for the next request. One system I use times out after as few as two minutes, which is exceedingly annoying when tracking the GPS of a vehicle which only reports every two minutes. — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 14:38, 13 March 2026 (UTC)
CT Not working for me
I activated CT using the Commons:CropTool page but it doesnt work. The tools bar isnt there. What should i do?? Wikiman2230 (talk) 21:42, 21 March 2026 (UTC)
- @Wikiman2230: Have you tried going directly to https://croptool2.toolforge.org/? What happened? — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 22:20, 21 March 2026 (UTC)
- i don't know. I was looking for that site tho as it appeared to be apart of the tutorial. I think it will work now but not tool Wise Wikiman2230 (talk) 22:36, 21 March 2026 (UTC)
- When you go to Special:Preferences is croptool checked? Bawolff (talk) 23:42, 21 March 2026 (UTC)
- yes Wikiman2230 (talk) 23:44, 21 March 2026 (UTC)
- User:Bawolff do we need to update the instructions at Commons:CropTool? Doc James (talk · contribs · email) 02:53, 22 March 2026 (UTC)
- @Wikiman2230 If you open the browser developer console (press F12 or see instructions at ), do you see any errors? Bawolff (talk) 05:11, 22 March 2026 (UTC)
The tools bar isnt there.
: do you possibly have it reduced to a single menu item "Tools"? - Jmabel ! talk 06:40, 22 March 2026 (UTC)- nope I still can't see it Wikiman2230 (talk) 14:03, 22 March 2026 (UTC)
- @Wikiman2230: Even if you try a different skin at Special:Preferences#mw-prefsection-rendering? Which skin were you using when this section started? — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 15:09, 22 March 2026 (UTC)
- Vector 2022. I switched to Vector 2010 however but it didn't work Wikiman2230 (talk) 15:22, 22 March 2026 (UTC)
- @Wikiman2230: Even if you try a different skin at Special:Preferences#mw-prefsection-rendering? Which skin were you using when this section started? — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 15:09, 22 March 2026 (UTC)
- nope I still can't see it Wikiman2230 (talk) 14:03, 22 March 2026 (UTC)
- @Bawolff: You mean in the "Interface: Editing and uploads" section of Special:Preferences#mw-prefsection-gadgets, right? — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 15:11, 22 March 2026 (UTC)
- yes Wikiman2230 (talk) 23:44, 21 March 2026 (UTC)
Error: abusefilter-disallowed
When I try to use CropTool2 on various images (such as File:Danity Kane 2025.png), I perform the crop, click the Upload button and I receive an error stating "Upload failed! [api] Received error: abusefilter-disallowed : ⧼abusefilter-warning-file-overwriting⧽". Am I doing something wrong? GoingBatty (talk) 14:15, 3 April 2026 (UTC)
- It seems that you clicked overwrite instead of upload as new file. GPSLeo (talk) 14:56, 3 April 2026 (UTC)
- @GPSLeo: My goal is to upload a new version of the file, not to save new file. Since "Overwrite" is an option, could you please help me understand why my attempt is triggering an abusefilter? GoingBatty (talk) 15:54, 3 April 2026 (UTC)
- I do not see why overwriting should be fine and comply with the COM:OW guideline here. GPSLeo (talk) 16:27, 3 April 2026 (UTC)
- @GoingBatty: Hi. I am sorry to inform you that you have triggered Special:AbuseFilter/290 many many times over the past 2+ years. The proposal to "Limit file overwriting to users with autopatrol rights" was accepted with many supports and one weak oppose 15:19, 23 September 2023 (UTC). After an implementation problem in phab:T345896 and testing, Special:AbuseFilter/290 went live with the Disallow action 09:35, 28 October 2023 (UTC). Please read MediaWiki:abusefilter-warning-file-overwriting. You may request COM:AP at COM:RFR when you think you are ready (now that you have made more than 500 useful non-botlike edits); having that should allow you to overwrite. Also, please think twice about cropping any file that is missing evidence of permission. — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 16:40, 3 April 2026 (UTC)
- @Jeff G.: Thank you for your detailed response. (It would be great to see that information on Commons:CropTool and/or the error message.) I have reviewed the links you provided and submitted a request for Autopatrol rights. Happy editing! GoingBatty (talk) 18:46, 3 April 2026 (UTC)
- @GoingBatty: It has nothing to do with croptool as a whole, just the overwrite capability. — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 20:13, 3 April 2026 (UTC)
- @Jeff G. Understood that this particular error is but one small part of the CropTool experience. GoingBatty (talk) 20:23, 3 April 2026 (UTC)
- @GoingBatty: It has nothing to do with croptool as a whole, just the overwrite capability. — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 20:13, 3 April 2026 (UTC)
- @Jeff G.: Thank you for your detailed response. (It would be great to see that information on Commons:CropTool and/or the error message.) I have reviewed the links you provided and submitted a request for Autopatrol rights. Happy editing! GoingBatty (talk) 18:46, 3 April 2026 (UTC)
- @GPSLeo: My goal is to upload a new version of the file, not to save new file. Since "Overwrite" is an option, could you please help me understand why my attempt is triggering an abusefilter? GoingBatty (talk) 15:54, 3 April 2026 (UTC)
CropTool interface message to avoid AbuseFilter 290
At Commons_talk:Abuse_filter#Report_by_TheFeds I mentioned my frustration with users being confronted with AbuseFilter 290 only after they had performed their desired edit with CropTool2. (It looks like this is also the same issue @GoingBatty encountered just above.)
Feature request: While filter 290 exists, query user permissions and generate a (non-modal?) UI message in CropTool predicting (before they spend the time to use the tool) whether the edit they are about to perform will be rejected by AbuseFilter. TheFeds 19:36, 11 May 2026 (UTC)
Error
I'm getting this strange message upon pressing "preview":
[Error] Command "jpegtran -copy all -crop '2048x2985+0+38' '/workspace/public_html/files/c99a0d6f99d1d6b3a99835fc60ce12ff7cb4a79d.jpg' > '/workspace/public_html/files/c99a0d6f99d1d6b3a99835fc60ce12ff7cb4a79d_cropped.jpg' 2>&1" exited with code 2: 2
Joalbertine (talk) 15:15, 16 May 2026 (UTC)
CropTool2 no longer shows up in tools menu
I have previously enabled and used CropTool2, but it no longer shows up in my tools menu. I just now clicked on "Activate CropTool!" under Commons:CropTool § Setup to see what would happen, but it merely refreshed the page with no change. What do I do? Sangdeboeuf (talk) 15:28, 10 June 2026 (UTC)
- It's there for me. At Special:Preferences#mw-prefsection-gadgets just check CropTool. Should show up in the "General" menu as "# CropTool". (CropTool2 has now superseded the original CropTool.) If that doesn't solve it for you, what is the environment you are running in (browser, OS)? - Jmabel ! talk 02:05, 11 June 2026 (UTC)
- OK, that worked, thank you. I must have deselected it by accident. Sangdeboeuf (talk) 13:54, 12 June 2026 (UTC)
Resolved
Feedback to newest version of CropTool
First of all, I offer my thanks for the valiant programmers: this newest version (that is active for a few hours by now) has surprised me in a positive way. Most of the abilities of the previous versions have carried over, and the new sliders and auto-tools do help a lot. And because all praise needs to come with a few grains of salt:
- The previous versions of the crop tool always offered a link to the original file in the top left of the screen, so that one could click that link and see the original filepage for comparison (including file description and categories - context which may be needed for reference when choosing new filenames). Such a link should be made available again, please.
- The ability to rotate the image via slider is okay. I still would like to input exact numerical values.
- The buttons to deselect categories for the new image are a great innovation. Could we also get the ability to directly set new categories? That way, I could deselect a current category and select the sub-sub-category in its stead, right away.
Thanks in advance for the necessary adaptations to the interface, and all my best regards, --Enyavar (talk) 09:02, 19 June 2026 (UTC)
- Thanks for this mostly goes to User:1Veertje. Sounds reasonable. Will ask Brian to work on this. Doc James (talk · contribs · email) 11:50, 19 June 2026 (UTC)
- Point 1: It's still there, but it has been moved! The filename in the header (next to the logo on desktop and below it on mobile) links to the original file page. I moved it because I wanted to keep the "Preview" button visible on a 1080p screen, and the new sliders made vertical space much scarcer. For the same reason the "Original: 2367×1775 px. Crop: 1894×1420 px." has been moved to below the image.
- Point 2: I'll look into implementing exact numerical input for rotation.
- Point 3: I intentionally kept category handling simple, but perhaps something can be done with moving categories up and down in the hierarchy (for example by using arrow controls).
- Thank you for the kind words and well wishes! Vera (talk) 14:34, 19 June 2026 (UTC)
- Great thanks, Vera, CropTool2 is awesome ! I am especially grateful for the rotator, having often rotated files entirely off Commons which takes much more time; and for the category deselector.
- I agree with Enyavar's points two and three. On the other hand, I do not think category order is important. Also, while it is great that the tool is now multilingual, the diacritics are missing in French and Spanish. Best wishes, GrandEscogriffe (talk) 16:19, 19 June 2026 (UTC)
- ah, I had spotted that the machine translation had somehow chosen to remove all diacritics from the German translation, but I guess my French is too rusty. Will fix. Vera (talk) 17:10, 19 June 2026 (UTC)
- What? This is still called a mere crop tool? The first thing I thought was, oh, it's also a capable tilter and rotator. Then I saw the brightness, contrast, saturation etc. This makes it a miniature online imitation of a photo editing package now! Being an ignorant and clumsy photo editor, this has all the editing power I can comfortable use; no longer must think about editing before uploading. Jim.henderson (talk) 05:15, 20 June 2026 (UTC)
- I understand that you wanted to keep category handling easy, please disregard my previous third point. New options awaken new greed for even more options. :-)
- Now, another issue I have run into: Exact numerical input for width and height! Right now, I was prevented from inputting "width=1425", because the tool insisted that only rounded numbers (1420 and 1430) were valid parameters. --Enyavar (talk) 10:46, 20 June 2026 (UTC)
- After a little more study, I think this is no longer the Crop Tool; it's the Retoucher, or Image Editor. This is a very good thing to have, and it would be improved by more numeric inputs for the various parameters rather than total reliance on sliders. As for categories, yes they are being crudely handled here, but rather than improve this feature, dropping it might be better, since cat wrangling does not really touch the image; it's all about metadata. When I work a picture, the most important tools are 1) HotCat, 2) Cat-a-lot, 3) Location-tool and 4) Crop Tool. Category and location metadata are entirely a different thing from the image itself, and their editing ought not be mixed in with editing the image. If we want better metadata (and yes, we do) then better metadata tools are what will help. Jim.henderson (talk) 04:15, 23 June 2026 (UTC)
- I'll counter the category issue with this: Many times, when cropping an image, some parts of the original image that had categories are removed, but editors often forget to remove those categories from the new image. I've certainly been guilty of this. By presenting the existing categories during the cropping process, it's a reminder of what is there and what might need to be removed. I greatly appreciate this new feature. — Huntster (t @ c) 05:25, 23 June 2026 (UTC)
- We also support this image annotation tool https://commons.wikimedia.org/wiki/Commons:ImageAnnotateTool Doc James (talk · contribs · email) 15:19, 24 June 2026 (UTC)
- I agree with Jim about the numeric inputs, but seeing and being able to change the cats can also be helpful, for example when cropping down from a landscape group shot to a portrait, bust, or headshot of one person. We don't need the misleading cats for anyone or anything that got cropped out. — 🇺🇦Jeff G. ツ please ping or talk to me🇺🇦 22:13, 24 June 2026 (UTC)
- Well then, it seems I am opposed by wise colleagues on my solution to the agreed inadequacy of this tool's category feature, which suggests the opposite course: Fix it. Beef up this feature, adding for example powers like those of Hotcat and Cat-A-Lot. Jim.henderson (talk) 15:01, 27 June 2026 (UTC)
- I'll counter the category issue with this: Many times, when cropping an image, some parts of the original image that had categories are removed, but editors often forget to remove those categories from the new image. I've certainly been guilty of this. By presenting the existing categories during the cropping process, it's a reminder of what is there and what might need to be removed. I greatly appreciate this new feature. — Huntster (t @ c) 05:25, 23 June 2026 (UTC)
"Invalid response from token request"
I tried to access this tool several times today and this was the response I got. Are my settings somehow outdated or is there a problem with the tool? -- Clemens 22:53, 23 June 2026 (UTC)
- I have same problem TheLoyalOrder (talk) 04:24, 24 June 2026 (UTC)
- @Maclemo @TheLoyalOrder, it appears the issue was due to changes to OAuth1. However, the problem should have resolved now. Can you check if CropTool is now working for you? Thanks. Tvpuppy (talk) 15:28, 24 June 2026 (UTC)
Placement of back button
I appreciate the option to change categories when cropping an image. I wonder if the "back" button (after selecting the crop) could be moved to the top/side of the page? If you choose the crop and want to readjust, you have to scroll to find the button, which adds a bit of friction. Thanks! — Wracking ( talk / contribs / uploads ) 19:30, 24 June 2026 (UTC)
Request to add translation
I would like to request to add translation for Chinese (zh) to CropTool2, and I noticed the translations for CropTool2 are stored here at the GitHub. I don't want to create a GitHub account, so apologies for any inconvenience for placing my request here.
CropTool2 translation for Chinese (zh) | ||||
|---|---|---|---|---|
|
Left is the existing English translation, right is the requested Chinese translation.
|
Please let me know if there is any problem/mistakes with my request. Thanks. Tvpuppy (talk) 14:22, 25 June 2026 (UTC)
- Thanks User:Tvpuppy, sounds like with this it should be easy for User:Bawolff to add ZH. Doc James (talk · contribs · email) 18:13, 25 June 2026 (UTC)
- Yes, we can add that. Thanks for the translation. I was thinking that we should add the tool to translatewiki to make it easier to get translations. Bawolff (talk) 18:20, 25 June 2026 (UTC)
- Thank you both for your help. Tvpuppy (talk) 19:03, 25 June 2026 (UTC)
Done https://github.com/wpmed/croptool2/commit/4b37d27ee023555fbf9faacd7bbb3800d38970f8 Bawolff (talk) 17:46, 2 July 2026 (UTC)
- Thank you both for your help. Tvpuppy (talk) 19:03, 25 June 2026 (UTC)
- Yes, we can add that. Thanks for the translation. I was thinking that we should add the tool to translatewiki to make it easier to get translations. Bawolff (talk) 18:20, 25 June 2026 (UTC)
- Thanks User:Tvpuppy, sounds like with this it should be easy for User:Bawolff to add ZH. Doc James (talk · contribs · email) 18:13, 25 June 2026 (UTC)
AI assisted background clean up
Hello CropTool developers,
We are drafting a project to guide users to use AI image editing to remove unhelpful background, see Commons:WikiMercados (draft). This is another frequently need image processing which was a dominant request to the various Commons:Graphic Labs (I was very active on those in the 2000s).
- Step 1: photography the produce on white page, light must come from behind the photographer.
- Step 2: image upload and prompt request.
- Step 3: elegant Image is ready. Step 4: Download, crop, upload to Commons.
- Step 1
- Step 2
- Step 3 & 4. (yes, there is an artifact almond on this test)
At one point such detouring tool could be built in a similar way as CropTool. But given the difficulties to set up a toolforge, OAUTH, and the fetch image —▶ process image —▶ upload image to commons, it could be better to integrate such feature within your CropTool stack. I made some DALL•E3 API tests a year ago so I don't know where those API services stands now in term of availability and cost. But I worth just keeping this idea in mind. Yug (talk) 07:57, 12 July 2026 (UTC)
- So we would need to purchase access to such functionality? Doc James (talk · contribs · email) 14:19, 12 July 2026 (UTC)
- Hello @User:Doc James, happy to bump into you again,
- There are also less frontiere while still satisfying open source models for background removals.
| Name & Repository | Primary Model | License | Deployment Options |
|---|---|---|---|
| rembg | BiRefNet / U²-Net / IS-Net | MIT | Python API, CLI, Docker, HTTP REST Server |
| BiRefNet | BiRefNet (Native) | MIT | PyTorch, Hugging Face Transformers |
| transparent-background | InSPyReNet | MIT | Python API, CLI |
| background-removal-js | ONNX Small Models | MIT | Web / Browser JS (Client-side, WebAssembly/WebGPU) |
- So the option opens up if your team is interested. There is also the WMF Machine learning team around so. There is something to discuss there. Will one of you be at the Wikimania hackathon ? Yug (talk) 18:31, 12 July 2026 (UTC)
- Yes a few of us will be at the Wikimania hackathon. User:Bawolff will be there. Would need to fine a solution the Commons community is happy with. Doc James (talk · contribs · email) 15:12, 13 July 2026 (UTC)
- So the option opens up if your team is interested. There is also the WMF Machine learning team around so. There is something to discuss there. Will one of you be at the Wikimania hackathon ? Yug (talk) 18:31, 12 July 2026 (UTC)
- @Yug: There is a fair chance that an AI edit of this sort would violate what Commons seems to be moving toward as guidelines for the use of AI. Please let's not work at cross purposes. And what, if anything, does this have to do with the CropTool?- Jmabel ! talk 18:08, 12 July 2026 (UTC)
- Hello Jmabel,
- Background removal without the object modification is not Generative AI and will not be affected by generative AI policies.
- The CropTool already has about 5/6 of the pipeline for processing existing images from Commons. Open source ecosystem doesn't have enough resources to replicate projects. But if your communities agrees, doing that 1/6 code as a sub-service is at reach. Yug (talk) 18:31, 12 July 2026 (UTC)
- In the example the tool did not just replace the background. The entire image was replaced with a different one. The almond example is event more obvious as there was not only a change in the camera angel but also an additional almond in der AI image. There are good AI tools to remove the background of an image, this is not one. GPSLeo (talk) 18:28, 12 July 2026 (UTC)
- Yes, it's a 10 mins trial, better can be achieved and it's not the main bottleneck. Key is to know if your team is somewhat open to making place for such ideas since it radically change the size of the project ahead, possibly by a factor 1 to 6. Yug (talk) 18:37, 12 July 2026 (UTC)
- If a tool is able to alter the main subject and not just the background without showing the mask used, this is a major problem and makes the tool entirely unusable for that purpose. GPSLeo (talk) 19:04, 12 July 2026 (UTC)
- Agree. By 2026, this technical bottlenecks is likely solved by 2~6h reading online manuals to identify the right tool to use. It s solvable.
- [EDIT] By 2026 open source solutions exists, ex: https://github.com/ravzzy/ai-remove-background. The main bottleneck is workload/human resources, that is where collaboration within CropTool pipeline would help immensely. An idea to consider. Yug (talk) 20:09, 12 July 2026 (UTC)
- If a tool is able to alter the main subject and not just the background without showing the mask used, this is a major problem and makes the tool entirely unusable for that purpose. GPSLeo (talk) 19:04, 12 July 2026 (UTC)
- Yes, it's a 10 mins trial, better can be achieved and it's not the main bottleneck. Key is to know if your team is somewhat open to making place for such ideas since it radically change the size of the project ahead, possibly by a factor 1 to 6. Yug (talk) 18:37, 12 July 2026 (UTC)
Can we force Commons to use Crop Tool 1 instead of 2 ?
The the croptool2 makes previews that are smaller than in original croptool, when using the tool Can we force Wikimedia Commons to load the version 1 of the tool instead of 2? Personal prefrence more than anything else, Tool2 seems to work just fine. Oaktree b (talk) 01:03, 13 July 2026 (UTC)
- So the request is for version 2 to make larger previews? Version1 is unmaintained is the issue. Doc James (talk · contribs · email) 04:36, 13 July 2026 (UTC)
- ct2 is under active development so i think it's better to use it in the long run.
- but i too used ct1 because something that was lost (precise pixel input) and i couldnt wait for ct2 update.
- so i went to https://croptool.toolforge.org/ directly.
- you could also copy MediaWiki:Gadget-CropTool.js to make your own js and replace croptool2.toolforge.org with croptool.toolforge.org . RoyZuo (talk) 07:49, 13 July 2026 (UTC)
- I've just been removing the "2" from the web address, it seems to load the first version... If you can get 2 to show bigger previews, that would be acceptable. Oaktree b (talk) 16:28, 13 July 2026 (UTC)
- @Oaktree b you can also right click and "open image in new tab" then you can zoom. even with ct1 i often did this to check the border when i did Category:Incomplete JPG files (5 MB interruption). RoyZuo (talk) 06:02, 14 July 2026 (UTC)
- I've just been removing the "2" from the web address, it seems to load the first version... If you can get 2 to show bigger previews, that would be acceptable. Oaktree b (talk) 16:28, 13 July 2026 (UTC)