Skip to content

Canvas images are displayed large #794

@K-Massy

Description

@K-Massy

Thank you for helping.

I implemented the code with reference to the official documentation,

img_url = $('#imag_thumb').children('img').attr('src');  // get image url

var el = document.getElementById('img-crop');
var resize = new Croppie(el, {
	viewport: { width: 100, height: 100 },
	boundary: { width: 300, height: 300 },
	showZoomer: false,
	enableResize: true,
	enableOrientation: true,
	mouseWheelZoom: 'ctrl'
});
resize.bind({
	url: img_url,
});

The image size displayed on canvas is not adjusted like in the official demo, and is displayed at the same image size.

How can I adjust the image size like in the official demo?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions