Answers.Body: <p>The best way would be to use the <a href="https://craftcms.com/docs/image-transforms" rel="nofollow">Fit image transform</a>.</p>
  
  <p>Set the transform to 'Fit' and set both your width and height values to 1000px. That way the image will continue to scale until the first longest edge reaches 1000px.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-27T16:08:33.783Z
Answers.LastActivityDate: 2016-05-27T16:08:33.783Z
Answers.UserDisplayName: Jamie Wade
Body: <p>I'm looking to setup an image transform via the control panel but I only want to resize the image (scale - not crop or fit). The trouble is that I don't know whether the uploaded image will be a portrait or a landscape. Is there a way to set it to just scale to a maximum bounding box?</p>
  
  <p>For example, if I want images to be a maximum 1000px width or height (whichever the longer edge is), how can I set that and maintain aspect ratio?</p>
  
Tags: <assets><image-transforms>
Title: Image Transforms: Is there a way to detect portrait or landscape?
ThreadText: # Image Transforms: Is there a way to detect portrait or landscape?
  
  (Asked by: username_0 on 2016-05-27)
  
  I'm looking to setup an image transform via the control panel but I only want to resize the image (scale - not crop or fit). The trouble is that I don't know whether the uploaded image will be a portrait or a landscape. Is there a way to set it to just scale to a maximum bounding box?
  
  For example, if I want images to be a maximum 1000px width or height (whichever the longer edge is), how can I set that and maintain aspect ratio?
  
  **Tags:** assets, image-transforms
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-05-27. Score: 4 | Accepted answer
  
  The best way would be to use the [Fit image transform](https://craftcms.com/docs/image-transforms).
  
  Set the transform to 'Fit' and set both your width and height values to 1000px. That way the image will continue to scale until the first longest edge reaches 1000px.
  
  
  ---
  
  