How can I dynamically resize images to a specific resolution that are uploaded in the form?