react-advanced-cropper icon indicating copy to clipboard operation
react-advanced-cropper copied to clipboard

URGENT - Image wrongly sized on Safari

Open onevcard-team opened this issue 2 years ago • 7 comments

Hello,

we have a image that is wrongly sized on safari. Can be reproduced on the code sandbox with this image: oneVcard_F_Logo_#51DDAA_transparent

https://codesandbox.io/p/sandbox/react-advanced-cropper-kkvbz?file=%2Fsrc%2Fstyles.scss%3A1%2C1

on chrome it works and the image is resized correctly:
image
image

on safari it looks like this:
image image

onevcard-team avatar Dec 07 '23 13:12 onevcard-team

Using version 0.19.4

onevcard-team avatar Dec 07 '23 13:12 onevcard-team

@oneVcard, it happens only with this current image? Could you send it in an archive?

Norserium avatar Dec 09 '23 10:12 Norserium

@oneVcard, it happens only with this current image? Could you send it in an archive? logo.zip

we have some other images where it happens but i cannot provide those as they are from our customers

onevcard-team avatar Dec 14 '23 11:12 onevcard-team

@Norserium any update on this?

onevcard-team avatar Jan 02 '24 12:01 onevcard-team

@Norserium

onevcard-team avatar Jan 19 '24 15:01 onevcard-team

@oneVcard, by the way, this issue is reproducing in other croppers. Try it yourself.

What I've investigated:

  1. This issue is specific for SVG images in Safari browser.
  2. It happens when we use as the source an resized image, in this case the image will incorrectly drew at a canvas.

I can offer you the workaround, that resolves this bug, but in some cases it may decrease the performance and leads to the appearing of the redundant image loading request.

I'm not sure that this solution can become official due to this circumstances, but perhaps it can be useful in your usecase.

Norserium avatar Jan 20 '24 13:01 Norserium

@Norserium

oh okay, thank you for analysing this and providing a workaround even tho it is not an issue from your component. Very much appreciated :)

onevcard-team avatar Jan 23 '24 15:01 onevcard-team