Page MenuHomePhabricator

Users and bots should be able to adjust image orientation (rotate images) during upload
Open, MediumPublic

Event Timeline

MZMcBride raised the priority of this task from to Needs Triage.
MZMcBride updated the task description. (Show Details)

https://commons.wikimedia.org/wiki/File:Ecce_homo,_Jacques_Bourgault_01.jpg seems like a decent example. How can we fix the image orientation during the upload process?

How can we fix the image orientation during the upload process?

I can think of two ways:

  • Do it client side. (Needs every client to implement it, though)
  • Do it server side. (Needs to append another param to action=upload with the desired rotation which is carried out on the server some time in the future?)

https://commons.wikimedia.org/wiki/File:Ecce_homo,_Jacques_Bourgault_01.jpg seems like a decent example. How can we fix the image orientation during the upload process?

There is no server side automatic rotation yet, maybe when T35186 is fixed.

I am not sure if this is hard to code... rotating in upload stash directly?

Storing a different file than what the user uploaded is a problematic idea. Confusion, permanent data loss if there is an error in the transformation, no easy way to check the upload success via the sha1 hash.

Storing a different file than what the user uploaded is a problematic idea. Confusion, permanent data loss if there is an error in the transformation, no easy way to check the upload success via the sha1 hash.

+1 what you said. There is a history for file revisions so I don't understand why it should not be used.

I propose to close this enhancement request.

Storing a different file than what the user uploaded is a problematic idea. Confusion, permanent data loss if there is an error in the transformation, no easy way to check the upload success via the sha1 hash.

+1 what you said. There is a history for file revisions so I don't understand why it should not be used.

I propose to close this enhancement request.

The current workflow is horrible. We have users actively uploading images that are rotated incorrectly. We then have users manually tagging these images for rotation. Then a user-run bot comes along and does the work. This is insanely inefficient and bad.

Nobody is saying we must destroy the original file. What is being said in this task is that quite a few users are uploading images that can't be immediately used in articles. That's a real bug in our file upload system. We should be able to ingest images and rotate them in the same interaction.

ingest images and rotate them in the same interaction.

When we keep the original file there is no need to force rotation into the upload process. As soon as https://phabricator.wikimedia.org/T35186 is merged you can modify any upload client to request rotation of some of the uploaded files... Another way would be manual tagging some time after the upload. Please note that you'd always have to tag those files manually. I don't see how this can be any more efficient.

ingest images and rotate them in the same interaction.

When we keep the original file there is no need to force rotation into the upload process.

There's an obvious need if the original file is mis-rotated and currently unusable. :-)

As soon as https://phabricator.wikimedia.org/T35186 is merged you can modify any upload client to request rotation of some of the uploaded files...

Yes, such as Special:Upload in MediaWiki core. And probably Special:UploadWizard as well (from the MediaWiki extension).

Another way would be manual tagging some time after the upload. Please note that you'd always have to tag those files manually.

Manual tagging and human involvement is expensive. Ideally we would fix these files as close to upload time as possible, usually with the involvement of the original uploader. This would be a lot better than waiting on volunteers to come around and clean up the mess later using manual tagging and bots.

I don't see how this can be any more efficient.

Dream big.

Doesn't that suggest a broken workflow?

This problem is as old as bug 6672 (fixed in 1.18); AFAIK, the cause is that many users have substandard software (like Windows and Windows image stuff) which messes up either the images, or EXIF, or both.

Actually, this is 100 % a dupe of T33504#359034. 4 years old technical debt biting. :)

As soon as https://phabricator.wikimedia.org/T35186 is merged you can modify any upload client to request rotation of some of the uploaded files...

Yes, such as Special:Upload in MediaWiki core. And probably Special:UploadWizard as well (from the MediaWiki extension).

UploadWizard sounds like a good place to add a small clickable rotation icon next to all files as soon as the server created the thumbnails.

Actually, this is 100 % a dupe of T33504#359034. 4 years old technical debt biting. :)

Not really. This ticket may be a duplicate, but not of that tracking task.

MZMcBride renamed this task from Figure out why people (or bots) upload so many images in need of immediate rotation to Users and bots should be able to adjust image orientation (rotate images) during upload.Jul 18 2015, 10:03 PM

Thanks a lot, Mr Aklapper!

One file from PC (for example shoulder straps https://commons.wikimedia.org/wiki/File:1914_Podpraporshchik_of_Russian_Siberian_1st_riflemen_regiment_p06.png) = two bots uploads (vertical and horizontal version) and description user makes only once, right?

Yours faithfully,
Nikolai Litvinov