User talk:Codehydro/Auto CSS image crop
Appearance
Extension:MultimediaViewer Extension:CommonsMetadata as pre-requisites
[edit]Thank you User:Codehydro for this tool, The instructions work great on this wiki, but it also requires Extension:MultimediaViewer and Extension:CommonsMetadata to get it to work on a vanilla mediawiki installation, I've spent a few hours trying to figure that out.--Uwe a (talk) 12:25, 14 May 2015 (UTC)
- @Uwe a: Can you point me to a mediawiki installation where this doesn't work? —CodeHydro 15:05, 14 May 2015 (UTC)
- Well, It works, its still on a non-public wiki installation; It kept complaining about the bSize value, debugging it showed bSize was always reported as null because it could not fetch those values prior getting the file or so.--Uwe a (talk) 20:56, 14 May 2015 (UTC)
- @Uwe a: Yeah, there isn't really a good way to make this work consistently across browsers other than relying on image data from MediaWiki. Downloading full image and determining the image size was too inefficient and didn't work on Firefox because its implementation of javascript lacks the ability to determine native image size. Tried retrieving file headers via AJAX instead to work around having to download the full file and found the Internet Explorer liked to omit some header information. List goes on. Was trying to make it work without MediaWiki data in order to allow this to work on images not yet uploaded, but alas MediaWiki data was the only source that was consistent at least on the English wiki. By the way, if you're using this script on a non-public wiki, would appreciate it if you add code comment with attribution or at least list the url to my userscript page. —CodeHydro 15:10, 15 May 2015 (UTC)