- OSU Drupal 8 Overview
- Technical Manual
- Working with Content
- Working with Structure
- Working with Appearance
- Working with Configuration
- Working with People
- Working with Groups
- Advanced Topics
Image Styles actually provides a Scale and Crop style out of the box, but the default style doesn't provide many configuration options.
Creating a custom two-step scale and crop style will provide the ability to better control your critical dimensions, as well as provide anchoring to consistently crop images from a given side.
You'll be redirected to the Add Image Style screen.
Image Style Name text field = enter a name for your image style. Tip: determine and implement a naming convention for your image styles. It will save you a great deal of frustration in the long run.
Click the Create New Style button.
Width text field = 1600.
We're performing a scale operation on this image therefore we only really need one dimension. Leave the Height field blank - it will adjust itself based on the width we've configured.
Allow Upscaling checkbox = leave blank. Checking this will allow a small image to be stretched to a size that is larger than the original image, which can result in poor image quality.
Click the Add Effect button.
Width text field = 1800. (Note how this is the width that we scaled to in our previous setting. The Crop effect requires values in both fields.)
Height text field = 640.
Anchor radio buttons = select the side that the crop will take. For our purposes, choose the center radio button.
Click the Add Effect button.