croptool icon indicating copy to clipboard operation
croptool copied to clipboard

Always use server side dimensions for client side cropper

Open bawolff opened this issue 6 months ago • 1 comments

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

bawolff avatar Jul 31 '24 21:07 bawolff