{"action":"created","issue":{"url":"https://api.github.com/repos/fengyuanchen/cropper/issues/619","repository_url":"https://api.github.com/repos/fengyuanchen/cropper","labels_url":"https://api.github.com/repos/fengyuanchen/cropper/issues/619/labels{/name}","comments_url":"https://api.github.com/repos/fengyuanchen/cropper/issues/619/comments","events_url":"https://api.github.com/repos/fengyuanchen/cropper/issues/619/events","html_url":"https://github.com/fengyuanchen/cropper/issues/619","id":135872697,"number":619,"title":"Images Are Stretched To Fit Cropper-Canvas","user":{"login":"iamjosan","id":5055842,"avatar_url":"https://avatars.githubusercontent.com/u/5055842?v=3","gravatar_id":"","url":"https://api.github.com/users/iamjosan","html_url":"https://github.com/iamjosan","followers_url":"https://api.github.com/users/iamjosan/followers","following_url":"https://api.github.com/users/iamjosan/following{/other_user}","gists_url":"https://api.github.com/users/iamjosan/gists{/gist_id}","starred_url":"https://api.github.com/users/iamjosan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamjosan/subscriptions","organizations_url":"https://api.github.com/users/iamjosan/orgs","repos_url":"https://api.github.com/users/iamjosan/repos","events_url":"https://api.github.com/users/iamjosan/events{/privacy}","received_events_url":"https://api.github.com/users/iamjosan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-23T21:33:55Z","updated_at":"2016-02-23T23:11:38Z","closed_at":"2016-02-23T23:11:38Z","body":"When a new image is dynamically loaded to be cropped via an input file element, the new image is stretched to fit the size of the original image.\r\n\r\nFor example, if the image that is loaded on window load measures 1000x500px, the new image that is loaded via an input file element will be stretched to those measurements, regardless of the new image's measurements.\r\n\r\n**How can I allow the cropper-canvas to stay fluid so that every image maintains its original measurements/aspect ratio?**"},"comment":{"url":"https://api.github.com/repos/fengyuanchen/cropper/issues/comments/187958050","html_url":"https://github.com/fengyuanchen/cropper/issues/619#issuecomment-187958050","issue_url":"https://api.github.com/repos/fengyuanchen/cropper/issues/619","id":187958050,"user":{"login":"iamjosan","id":5055842,"avatar_url":"https://avatars.githubusercontent.com/u/5055842?v=3","gravatar_id":"","url":"https://api.github.com/users/iamjosan","html_url":"https://github.com/iamjosan","followers_url":"https://api.github.com/users/iamjosan/followers","following_url":"https://api.github.com/users/iamjosan/following{/other_user}","gists_url":"https://api.github.com/users/iamjosan/gists{/gist_id}","starred_url":"https://api.github.com/users/iamjosan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamjosan/subscriptions","organizations_url":"https://api.github.com/users/iamjosan/orgs","repos_url":"https://api.github.com/users/iamjosan/repos","events_url":"https://api.github.com/users/iamjosan/events{/privacy}","received_events_url":"https://api.github.com/users/iamjosan/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T23:11:38Z","updated_at":"2016-02-23T23:11:38Z","body":"Okay I figured it out. You have to use the replace() method. "}}