Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6702] Image cropper increases size of an image relative to the original #3843

Merged
merged 1 commit into from May 6, 2024

Conversation

jvega190
Copy link
Member

@jvega190 jvega190 requested a review from rart as a code owner April 30, 2024 16:52
@@ -363,7 +363,7 @@ CStudioAuthoring.Dialogs.CropDialog = CStudioAuthoring.Dialogs.CropDialog || {
self = self;

const canvas = $image.cropper('getCroppedCanvas');
var dataUrl = canvas.toDataURL();
const dataUrl = canvas.toDataURL(imageData.meta.type);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default type value for toDataURL is image/png, causing the size of jpg images to be bigger than the original

@sumerjabri sumerjabri merged commit 05393a7 into craftercms:develop May 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants