Open main menu
This is the talk page for discussing improvements to Commons:CropTool.
Notice Maintenance notice
Maintenance for this tool is at - please do not report bugs in Phabricator tasks. You can see the last edit it tagged here.


Converting file typeEdit

It would be great if it would become possible to upload the cropped image in a different file type compared to the original image. This would be useful if the filetype of the original image is not appropriate (e.g. PNG for photographs or JPEG or diagrams). --Leyo 15:30, 3 January 2018 (UTC)

I carried it on GitHub. -- User: Perhelion 23:08, 19 January 2018 (UTC)
Thanks, I spotted it there. Let's hope for an implementation. --Leyo 14:58, 31 January 2018 (UTC)
@Danmichaelo: What's the status? --Leyo 23:05, 10 November 2018 (UTC)
There's a few other things I'm planning to do with Croptool first, but you'r welcome to upvote the issue on GitHub if you would like to have it prioritized. – Danmichaelo (δ) 20:04, 11 November 2018 (UTC)

Feature requestsEdit

Hi Danmichaelo,

According to this discussion (in German), it would be great, if the CropTool could name the original image as "source" and add the cropping user as additional "author" in the infobox. That's apparently necessary to fulfill all requirements of the CC licenses. Would you think that's possible?


--MB-one (talk) 13:34, 16 May 2018 (UTC)

Interesting discussion, I haven't really thought about licensing implications. I'll experiment a little to see what can be done. At least replacing the source field should be fairly straightforward. Adding the cropping user can probably be done in the simple cases where the information template is used in a fairly standard way at least. Guess "Cropped by X" should be a template so it can be translated. – Danmichaelo (δ) 11:27, 19 May 2018 (UTC)
How about if the Tool checks, if the CropUser ist the original uploader (then does nothing), otherwise uses a cropped-template, that uses tilde-characters as the default parameter, but can be replaced with input from the tool? --C.Suthorn (talk) 09:02, 24 October 2018 (UTC)

Flip overEdit

Another useful feature would be to (losslessly) mirror a picture (horizontally or vertically). miktalk 07:48, 21 August 2018 (UTC)

This sounds like something closer to the scope of User:Rotatebot than CropTool. Tokfo (talk) 04:23, 22 August 2018 (UTC)
As long as it is restricted to lossless rotations, it would be helpful to be able to do it on the spot with a tool rather than to have to wait for a bot. --MB-one (talk) 08:48, 22 August 2018 (UTC)
If something like this were to be implemented (by any tool), a note regarding guidelines on usage should be added, see explanatory text at Category:Flopped images and Category:Flopped images of persons. Flopped images depicting people, works of art, or other identifiable objects should generally not be used if it would mislead the viewer. Flopping images of animals, symbols, or objects (tools, food, etc) is a more appropriate usage, as would be fixing images that are incorrectly flopped or flipped. --Animalparty (talk) 23:40, 10 May 2019 (UTC)


Example for Original file description -- Geagea (talk) 12:09, 20 October 2018 (UTC)

Two things are bother me in the new cropped file:
The new file always gets the old description. I suggest that the description should get Original file description: ... It is also be good if we can have the option to add new description.
Also it will be nice if we can remove and add categories. -- Geagea (talk) 11:35, 21 August 2018 (UTC)

More simply, it would be nice if it would just open the full description page before committing the upload so that all the things could be adjusted as needed. Huntster (t @ c) 13:28, 21 August 2018 (UTC)
I don't understand the advantages in the workflow in comparison to the status quo. Right now, CropTool links you to the new description page, which you can then edit like any other page, with all the usual tools like HotCat. I don't see the use of reimplementing an editing interface or adding anything else just so that a "wrong" description page isn't displayed for a few minutes until the cropping editor gets to updating it – there's no real harm in this. What's being proposed here seems like bloatware to me. Tokfo (talk) 04:21, 22 August 2018 (UTC)
It's a matter of simplifying the process. Reduce two or more steps into one streamlined process. Huntster (t @ c) 06:56, 22 August 2018 (UTC)
Most of the users do not change the description, you can check it if you want, so the Original file description: ... is essential change. Also most of users do not remove extra categories. Maybe if they have the list of categories with +/- it would be easier for them remove them. When I see files edit summey: "Added/updated {{Image extracted}} using CropTool", I know that some categories should be removed. I think that the suggestion of Huntster is good also but not instead of my suggestion. -- Geagea (talk) 10:11, 22 August 2018 (UTC)
I agree and should have been more specific in my statement. Appending Original file description: ... would be an excellent step forward regardless. Huntster (t @ c) 13:05, 22 August 2018 (UTC)
@Geagea: I like the use of {{Information field}} for this.   — Jeff G. please ping or talk to me 12:52, 20 October 2018 (UTC)

Precise/lossless modeEdit

I suggest renaming "precise" mode to "lossy" mode and "lossless" to "quality" mode (leave the descriptions intact). And make sure lossless (quality) is the default (I'm not sure if it already is).

People seem to select "precise" pretty much always when 9 times out of 10 (if not more) there was no need. Precise sounds good, "lossless" has no meaning to them. - Alexis Jazz ping plz 01:08, 10 November 2018 (UTC)

Alexis Jazz If you write only "lossy" you can be sure that no one will be use it forever :). Before using crop tool people must read the guidelines, where modes are fully detailed. Moreover 9 time of 10 people use the lossy mode but do not overwrite the original image. So there is no actually any loss of quality. Lossless mode it's very time consuming because you need many attempts to reach your goal--Pierpao.lo (listening) 15:46, 10 November 2018 (UTC)
Why not both? If you make each option occupy one line, there's enough space to write something like:
  • Precise crop (will lose quality)
  • Preserve quality (slightly larger crop)
If it's possible (now in the realm of feature requests), the tool could even pre-calculate how many pixels larger the losslessly cropped image will be, and then
  • tell the user something like "3px taller, 4px wider than selected", or
  • only allow the user to select an area of sizes that will be preserved precisely while "lossless" is selected, and/or
  • not allow the user to select "precise" at all if that calculation yields 0px taller and 0px wider.
I don't know how easy that is; can that calculation be done if you input only the image dimensions and desired cropped area? Tokfo (talk) 16:00, 10 November 2018 (UTC)
@Tokfo: Anything is possible. I don't maintain the tool though. Your suggestion with two lines would also be fine. Automatically switching to lossless mode when the calculation is 0px 0px shouldn't be super hard, but I can't say for sure.
@Pierpao: Lossless is only an issue if you are cropping a 640 × 480 photo. On a 3000 × 2000 photo, the maximum 7 pixels rounding error is just 0.35% of those 2000 pixels and 0.23% of those 3000 pixels. And that's if you get the maximum error. - Alexis Jazz ping plz 19:53, 10 November 2018 (UTC)

Abuse WarningEdit

I try to remove a non free frame, uploading on the same image of course but I received an abuse warning. Why? it is a nonsense--Pierpao.lo (listening) 15:48, 10 November 2018 (UTC)

It's unlikely that anyone will be able to help you if you don't say which image you're talking about. Tokfo (talk) 16:07, 10 November 2018 (UTC)
@Pierpao: your file is probably classified as "artwork". Just hit upload again (make sure overwrite is still selected), it'll come through. - Alexis Jazz ping plz 19:58, 10 November 2018 (UTC)
Thanks Alexis Jazz and Tokfo--Pierpao.lo (listening) 09:05, 11 November 2018 (UTC)

Received only 6141873 of 7547111 bytesEdit

File:Sriwijaya Air Boeing 737-236, Lion Air Boeing 737-4Y0, and Express Air Boeing 737-337; @CGK 2014 (14805654601).jpg

"Received only 6141873 of 7547111 bytes from before the server closed the connection. Please retry in a moment."

  - Alexis Jazz ping plz 14:41, 1 December 2018 (UTC)

This has been happening randomly for the past few days. It's not just affecting CropTool, but everyone who tries to download full-size images from Commons, see phab:T210890. I'm considering adding a workaround (resume the broken download in some way), but will give it a few days first to see if they can fix the issue. – Danmichaelo (δ) 22:35, 3 December 2018 (UTC)
Changed my mind and added a workaround now. Turned out to be not much work, but loading will be slower until the issue is resolved. – Danmichaelo (δ) 22:59, 3 December 2018 (UTC)

Time out: 502 Bad GatewayEdit

@Danmichaelo:, CropTool seems to have a problem. After a long time out I see: "502 Bad Gateway nginx/1.13.6" - Robotje (talk) 11:30, 17 December 2018 (UTC)

Now it works again. If somebody did a restart or so, thanks for that. - Robotje (talk) 12:26, 17 December 2018 (UTC)
Yeah, I had to restart it earlier today. – Danmichaelo (δ) 16:46, 17 December 2018 (UTC)
@Danmichaelo: Thanks, still no joy with auto-restart?   — Jeff G. please ping or talk to me 17:45, 17 December 2018 (UTC)
Nope, not yet. – Danmichaelo (δ) 18:19, 17 December 2018 (UTC)

Blue Winged Kookaburra-4 (11407435085).pngEdit

To my surprise, the CropTool has removed the Adobe RGB (1998) ICC profile. This happened only on PNG images, with JPGs is everything OK. --Ras67 (talk) 15:03, 4 January 2019 (UTC)

Need to look more into this. Created an issue to track it: (δ) 06:35, 20 February 2019 (UTC)

does not work for yuewpEdit

Try . Does it say file not found? I guess this bug is related to the irregular langcode too.--Roy17 (talk) 00:54, 8 January 2019 (UTC)

@Roy17: This has now been fixed, thanks for reporting. – Danmichaelo (δ) 06:34, 20 February 2019 (UTC)


I use CropTool often, it's a great time saver and tool. I just have some suggestions for ways to improve it:

  • When toggling between Aspect ratios (Free, Keep, Custom), it would be nice if the selection window stayed put (or at least somewhat) rather than jumping back to a default position in the center: often times while trying to keep the original aspect ratio I'll zoom in and position, only to realize that a Free size would make a bit more sense (e.g. left edge needs to come in just a bit), yet clicking Free forces me to readjust and re-center the selection window rather than just making a slight change.
  • I've recently been using the Custom aspect ratio settings more often, to make crops a bit more standard. I think a good addition would be a pop-up menu or drop down selectable menu with some of the most commonly used standard aspect ratios (e.g. 3:2, 4:3, 16:9, 1:1, see [1] and [2]). I think this would aid in improving the aesthetics of crops, and making it easier for people to find ratios that 'look good' without too much tinkering or background knowledge of photographic composition. Of course, they could enter their own truly custom ratios as well.
  • It would be helpful to have an option to rotate the crop window (not the image) 90 degrees, and back, with one click, e.g. for extracting a nicely composed portrait out of a landscape-oriented photo. I think the more easily one can visualize different crops, and toggle between them, the quality of such crops will be improved. Thanks! --Animalparty (talk) 19:33, 17 January 2019 (UTC)
  • +1 (more of a problem): CropTool tends to fail when dealing with large file sizes: for instance I've tried several times to run it on File:BRANHAM, LUCY. SUFFRAGETTE LCCN2016869830.jpg (10,260 × 7,652 (8.53 MB)) and just get a broken image link. Is this a known issue? --Animalparty (talk) 00:03, 18 January 2019 (UTC)
    @Animalparty: It's working for me now on that file; you've got 3 crops to choose from (showing down to the knees, bust, and head).   — Jeff G. please ping or talk to me 02:07, 31 January 2019 (UTC)
@Jeff G.: It seems that with large files it sometimes takes a few tries before everything loads smoothly. Like sometimes the first try I'll get a broken image link, and the second try the image will load but then an error arises during preview. It could just be a connection issue on my end. --Animalparty (talk) 04:44, 31 January 2019 (UTC)
@Animalparty: Do you still have problems with large images? In general it's supposed to work with files up to around 50 MB, but I guess timeouts can happen if the server is busy in general. If you have some recent examples, I'm happy to check if there's something interesting in the logs. – Danmichaelo (δ) 23:32, 19 February 2019 (UTC)
I haven't noticed insurmountable problems lately: some large images just take a couple attempts to go smoothly. --Animalparty (talk) 23:34, 19 February 2019 (UTC)
A couple attempts still sounds a bit annoying. If you happen to remember an example, let me know. Or when it happens again. And thanks for the ideas btw., agree that they would improve the tool. I'll add them to my list. – Danmichaelo (δ) 23:42, 19 February 2019 (UTC)


Anybody else getting 502 and 503 errors until you just button mash refresh till it works? I mean, it does eventually work, but it takes like a dozen refreshes. GMGtalk 17:39, 12 February 2019 (UTC)

Bueller?...Bueller? GMGtalk 13:35, 14 February 2019 (UTC)
@GreenMeansGo, Danmichaelo: I did not experience that, but I did experience "Upload failed! [api] Received error: verification-error : File extension ".pdf" does not match the detected MIME type of the file (image/jpeg)." and untrue "The overwrite option is disabled because this is a multipage file." when trying to crop File:1900 Utah Agricultural College football team.pdf.   — Jeff G. please ping or talk to me 14:50, 14 February 2019 (UTC)
Evad37, you apparently can do computer magic. Any chance you can help us peons over at Commons? GMGtalk 00:31, 15 February 2019 (UTC)
Hi all. I did take a quick look at the source code, but couldn't see any obvious problems. There does seem to be relatively recent activity (Dec 2018) on the Github repo, so you could try adding new issues for these bugs over there, or contacting the main contributor danmichaelo. - Evad37 [talk] 01:06, 15 February 2019 (UTC)
@Evad37: I pinged him at 14:50 UTC, three posts back.   — Jeff G. please ping or talk to me 02:41, 15 February 2019 (UTC)
I've filed these as issue #124 and issue #125 on GitHub - Evad37 [talk] 02:49, 16 February 2019 (UTC)
Thanks for filing the issues and sorry for my slow reply. My activity is a bit on and off due to other projects, but I'm still (actively) maintaining CropTool and over time I hope to be able to swap some components to possibly reduce the number of 5XX incidents. And Jeff_G., I'll look into the PDF issues – Croptool do not have support for creating PDF files, so it should automatically suggest a .jpg extension for the new file, but apparently it does not. Of course, being able to choose between jpg and png would also be good. – Danmichaelo (δ) 23:20, 19 February 2019 (UTC)
@Danmichaelo: Thanks.   — Jeff G. please ping or talk to me 02:20, 20 February 2019 (UTC)
  • /me continues to button mash GMGtalk 14:25, 7 March 2019 (UTC)
@GreenMeansGo, Danmichaelo: I reported the "No webservice" issue at   — Jeff G. please ping or talk to me 14:38, 7 March 2019 (UTC)
@Danmichaelo: Thanks for restarting it. @GreenMeansGo: Please try again.   — Jeff G. please ping or talk to me 15:08, 8 March 2019 (UTC)
I managed to crop three of the six files I couldn't yesterday. But I'm still getting 502 and 503 errors, and half the time when I am able to set the proportions for the crop, it fails to upload. GMGtalk 15:57, 8 March 2019 (UTC)
@GreenMeansGo: Please ping @Danmichaelo when reporting such errors here, and consider reporting such things on github.   — Jeff G. please ping or talk to me 20:37, 8 March 2019 (UTC)
I'll try to remember to ping. I'm afraid Github is beyond my technical competence, as is much of what goes on at phab. GMGtalk 15:59, 9 March 2019 (UTC)
@GreenMeansGo: Thanks. Writing Github Issues and Phabricator Tasks is easy if you stick to text and bare URLs.   — Jeff G. please ping or talk to me 18:22, 9 March 2019 (UTC)

jpegtran exited with code 2Edit

@Danmichaelo: I got "[Error] Command "/data/project/croptool/jpeg-9a/jpegtran -copy all -crop '3024x1189+0+0' '/mnt/nfs/labstore-secondary-tools-project/croptool/public_html/files/b920c594697f84cc1a30698e1ce76b08ec330ee7.jpg' > '/mnt/nfs/labstore-secondary-tools-project/croptool/public_html/files/b920c594697f84cc1a30698e1ce76b08ec330ee7_cropped.jpg' 2>&1" exited with code 2: 2" while trying to crop File:2019 Virginia Avenue train tunnel entrance.jpg. See also   — Jeff G. please ping or talk to me 14:57, 9 March 2019 (UTC)

Seems like jpegtran (lossless) fails for incomplete JPEG files. Precise/lossy cropping most likely still works though. – Danmichaelo (δ) 15:05, 10 April 2019 (UTC)

Stopped workingEdit

After using the tool hundreds of times, it's stopped working for me. I always go from a media file, & for the first time it now asks me what file I want to crop. When I enter the file name, nothing happens. Why?

Also, it's long been a problem that I have to do the log-in/connect/authorization thing randomly every few times I use the tool. It's supposed to be one-off, but I must have done it dozens of times. Johnbod (talk) 15:38, 16 March 2019 (UTC)

@Johnbod: The first part sounds like it might have been related to the bug I fixed yesterday. Let me know if you still have problems (please provide a link to an example image). As for the authorization issue, I'm not aware of specific issues on that side. If you use the same browser and don't wipe cookies, you should remain logged in for a long time (a year I think), but there might of course be some issue I'm just not aware of on that side. – Danmichaelo (δ) 20:13, 25 March 2019 (UTC)
Ok thanks - I do wipe cookies, though I think the authorization is required more often than I do that. By the way, I tend to get 2 "Crop tool" sidebar entries, & I found one of them had the first problem above, and the other didn't. Cheers, Johnbod (talk) 21:11, 25 March 2019 (UTC)
Oh dear. After restarting my machines - I now have exactly the same problem, so can't use the crop tool. There's no point "providing a link to an example image" as all images take me to the same page which doesn't work. I get asked "What to crop? / Enter the URL or filename for an image you would like to crop." I put the file name in, it confirms it exists, then I press "Open" and NOTHING HAPPENS. EVER! Johnbod (talk) 15:22, 27 March 2019 (UTC)
@Johnbod: It works for me. Did you "connect it to your Wikimedia account" or reauthorize with OAuth? What file were you trying to crop?   — Jeff G. please ping or talk to me 00:08, 28 March 2019 (UTC)
Yes, yet again. It was the same with ALL files, but now it is working again. And once again I have two Crop tools on my sidebar (both of which now work - at first only one did). Is it possible it takes 3+ hours after re-re-authorizing for the tool to work properly? Johnbod (talk) 03:40, 28 March 2019 (UTC)
@Johnbod: Try removing the code from User:Johnbod/common.js and you should get rid of the duplicate link. – Danmichaelo (δ) 19:19, 2 April 2019 (UTC)
Hmm - that might well remove the one that works! Johnbod (talk) 19:39, 2 April 2019 (UTC)
@Johnbod: Probably not, the escaping is better in MediaWiki:Gadget-CropTool.js than in your version. – Danmichaelo (δ) 15:07, 10 April 2019 (UTC)
Ok, thanks - next time I have trouble - for now it's fine. Johnbod (talk) 15:11, 10 April 2019 (UTC)


When attempting to upload a crop of this image I repeatedly receive the message "Upload failed! [api] Received error: autoblocked : Your IP address has been blocked automatically, because it was used by a blocked user." As far as I know, I am not blocked and am the only one using my IP address. This persists after logging out and re-authorizing with CropTool. Is this a glitch or am I somehow shadow blocked? --Animalparty (talk) 20:06, 18 April 2019 (UTC)

Does Animalparty expect CropTool to do data processing inside the user’s browser, seriously? Incnis Mrsi (talk) 20:23, 18 April 2019 (UTC)
@Incnis Mrsi: I'm just trying to troubleshoot a problem. I don't fully understand your question. I was able to use the tool this morning, and now I can't. I'm able to upload using Flickr2Commons. I'm not asking anyone to look at my browser, seriously. --Animalparty (talk) 20:28, 18 April 2019 (UTC)
@Animalparty: I don't think it's just you - I'm getting the same error message. @Danmichaelo: Did you change something recently, or is this a Labs problem? Pi.1415926535 (talk) 20:57, 18 April 2019 (UTC)
@Pi.1415926535: Nope, didn't change something recently. Not sure if it's caused by a local block here at Commons, or something else, but I tried reporting it at Commons:Administrators' noticeboard/Blocks and protections in any case. Special:Log is timing out at the moment, so I'm not able to check. – Danmichaelo (δ) 13:39, 19 April 2019 (UTC)

Blocked by this tool without reason or notificationEdit

I don't use this tool by blocked message:

Upload failed! [api] Received error: autoblocked : Your IP address has been blocked automatically, because it was used by a blocked user. 

I do not know why I was blocked without notification, or for what reason. Thanks Shooke    (Talk me in spanish, english or italian) 22:24, 18 April 2019 (UTC)

@Shooke: Don't worry. This message means that the server IP has been blocked, not you. But why is there an IP block on the Toolforge server? I have no idea, will try to find out. – Danmichaelo (δ) 13:22, 19 April 2019 (UTC)
@Danmichaelo: OK, Saludos Shooke    (Talk me in spanish, english or italian) 13:29, 19 April 2019 (UTC)
Ok, so it's back working after 4nn1l2 from Commons:Administrators' noticeboard/Blocks and protections helped unlifting the autoblock of a user that had happened to have used CropTool before being blocked. It's a little surprising that IPs used when editing through tools like CropTool are included in the set of autoblocked IPs, but that seems to be the situation. – Danmichaelo (δ) 15:11, 19 April 2019 (UTC)
The IP range for Toolforge was just added to MediaWiki:Autoblock whitelist. I'm not 100 % sure, but thi might prevent this problem from happening again in the future. – Danmichaelo (δ) 18:36, 19 April 2019 (UTC)
Thanks for your quick response! Pi.1415926535 (talk) 21:33, 19 April 2019 (UTC)

Can 'overwrite' been changed as default setting?Edit

CropTool uses "overwrite" (the old file) as a default setting, whereas I consider "upload as new file" a better option, because the original file will sill exist and can still be used on Commons. Is it possible to change the default setting to "upload as new file"? Ymnes (talk) 09:33, 4 May 2019 (UTC)

webp filesEdit

It seems that the tool can't yet handle webp files like File:Theatre, Birmingham - circa 1774-1779 - attributed to Hubert Cornish.webp. Could that be enabled, please?

— Preceding unsigned comment added by Pigsonthewing (talk • contribs) 20:07, 7 May 2019‎ (UTC)
Correct, that is something that should be added. I created an issue for it here: (δ) 22:41, 17 June 2019 (UTC)

croptool not appearing on file pageEdit

I am trying to split this image into two new pics, and the CropTool is not showing in the sidebar. I also get an error using the URL version:

File «Parasite140083-fig3 Figs 15-22.tif» found on «».

I've used the tool many times before. --NessieVL (talk) 14:32, 6 June 2019 (UTC)

Apparently the tool just doesn't like that it is a TIFF file, since it is appearing correctly elsewhere. Hmm. Huntster (t @ c) 02:31, 7 June 2019 (UTC)
Yeah, the tool is only built for jpg, png, and gif files currently. You can do it locally with GIMP or other image editing tools. Pi.1415926535 (talk) 02:43, 7 June 2019 (UTC)
Okay, then the description page may not want to read "It supports JPEG, PNG, TIFF and (animated) GIF files, and can also extract single pages from DJVU and PDF files as JPEG for cropping." ? Huntster (t @ c) 09:37, 7 June 2019 (UTC)
Pinging @Danmichaelo.   — Jeff G. please ping or talk to me 16:37, 7 June 2019 (UTC)
@NessieVL, Huntster, Pi.1415926535: Sorry for the slow reply! Turned out tiff support was broken after an upgrade, but it's now back working. – Danmichaelo (δ) 22:38, 17 June 2019 (UTC)
As for it now showing in the menu for TIFF files, it should once this edit request is processed. – Danmichaelo (δ) 22:46, 17 June 2019 (UTC)
Thanks for taking care of this, Danmichaelo! Huntster (t @ c) 23:01, 17 June 2019 (UTC)
Thanks for the fix. I was able to crop the image (twice, actually) using the 'manual' mode. However, the tool still does not appear in the sidebar for that image. --NessieVL (talk) 12:41, 19 June 2019 (UTC)
Yeah, I'm waiting for some Commons administrator to handle this: MediaWiki_talk:Gadget-CropTool.js#Add_TIFF. – Danmichaelo (δ) 20:56, 22 June 2019 (UTC)

Uploading over redirectsEdit

I fairly often see the tool uploading over redirects, e.g., [3]. Can you please put in a check to disallow this? Thanks. Magog the Ogre (talk) (contribs) 22:13, 5 July 2019 (UTC)

Return to the project page "CropTool".