Skip to content

fix(resizeImageToCover): switch to canvas to support Firefox#126

Open
FloChehab wants to merge 1 commit intolivekit:mainfrom
FloChehab:fix/resize-img-firefox
Open

fix(resizeImageToCover): switch to canvas to support Firefox#126
FloChehab wants to merge 1 commit intolivekit:mainfrom
FloChehab:fix/resize-img-firefox

Conversation

@FloChehab
Copy link

Hello,

Here is a quick fix regarding the resize / crop logic for backgrounds.
The previous implementation was producing distorted / not-cropped images on Firefox (but working on Chrome), apparently the createImageBitmap doesn't behave in the same exact way between Browser.
Switching to canvas based API which has better broader support.

I have tested my fix on both Chrome & Firefox.

Previous implementation was producing distorted images on Firefox.
Switching to canvas based API which has better broader support.
@CLAassistant
Copy link

CLAassistant commented Mar 12, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants