croptool
croptool copied to clipboard
Always use server side dimensions for client side cropper
SVG files can potentially have relative widths and heights where their size is relative to the browser size. This causes cropping to fail as the backend and frontend disagree on what size the image is.
This forces the js cropper code to always use the server side width & height, to ensure that everything is in agreement.
Most SVGs specify an absolute width & height so don't have this issue. An example of a file with this issue is https://commons.wikimedia.org/wiki/File:Eclampsia_svg_hariadhi.svg