0

There are resizing answers at Jquery resizing image

In the code, there is:

var maxWidth = 100; // Max width for the image
var maxHeight = 100; // Max height for the image

Is it possible to resize to fixed size of 100px x 100px?

3
  • This can be done with CSS width:100px;height:100px; however, the image will be stretched and look funny this way. you might be interseted in the jcrop library Commented Jun 26, 2014 at 17:04
  • I am using the user uploaded images inside a step carousel. jcrop library doesn't work there. Commented Jun 26, 2014 at 17:07
  • CSS has the clip property that can be set on absolutely positioned elements. JSBin. Commented Jun 26, 2014 at 17:28

1 Answer 1

1

Or you can use CSS as background-image while background-size: cover; background-position: center center;

Sign up to request clarification or add additional context in comments.

1 Comment

It needs to be img tags

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.