scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
875 stars 304 forks source link

Demo doesn't work with jpgs #105

Closed mrchief closed 9 years ago

mrchief commented 9 years ago

Does it only work with pngs? I uploaded several jpgs and none of them loaded in the preview. No errors in console but the preview simply doesn't work.

scottcheng commented 9 years ago

It should work jpgs. The reason you think it's not working is probably because the image is too small. I've added a error message on the demo so it doesn't fail silently. Let me know how that works for you.

mrchief commented 9 years ago

Yeah I see the error now. Is there a specific reason for this check? Most avatars will not be as big so this check could be limiting in those scenarios.

scottcheng commented 9 years ago

By default cropit requires images that are larger than the preview area os it won't be stretched. This is to ensure cropped image quality. For avatars your required size would also be relatively small. If you want to allow smaller images, there is a smallImage option.