What is the difference between "Fill", "Fit" and "Limit" scaling modes?

Follow

Comments

6 comments

  • Avatar
    Nickolas Olazabal

    Thank you! That exactly what I was looking for some time (there is a mistake in "fit" text before the second URL: is "...the fill crop mode..." should be "...the fit crop mode..." ).

  • Avatar
    Julien Bornstein

    And the difference between "fill" and "thumb" ?

  • Avatar
    Itay Taragano

    The `fill` crop mode will resize the original image and may crop either the width or the height in case the requested aspect ratio is different than the original:
    http://res.cloudinary.com/demo/image/upload/w_200,h_200,c_fill/face_left.jpg

    When it comes together with the `face` or the `faces` gravity modes, the `thumb` crop mode will create a thumbnail cropped version, of the face(s) coordinates:
    http://res.cloudinary.com/demo/image/upload/w_200,h_200,c_thumb,g_face/face_left.jpg

  • Avatar
    Lennart Giaccotto

    I want to prevent users to upload an image smaller than a given height and/or width so i don't have to upscale so much using one of the options explained above. Is this possible?

  • Avatar
    Daniel Mendoza

    Hello Lennart,


    Thanks for reaching out to us and I would like to apologize for not responding sooner.


    Yes, it is possible and the two options you are looking for are "min_image_height" and "min_image_width" in the upload widget options (http://cloudinary.com/documentation/upload_widget#upload_widget_options).

  • Avatar
    Lennart Giaccotto

    Thank you Daniel! That wil do the trick!

Please sign in to leave a comment.