Optimize images
Fast, easy image prep
Start here
- C&M Flickr
- C&M Portraits Flickr
- Squoosh – for photos downloaded from Flickr
- ImageResizer – for photos that need to be cropped
Image processing
Image sizing, naming and alt-text best practices apply across all sites using the 42 Design System. This process assumes familiarity with Adobe Photoshop.
Two things to know about images:
- Never just upload a raw image that you downloaded from flickr. Always prep it first.
- Upload only one copy. WordPress will automatically create copies for multiple pre-defined use cases
Download images/Rename and store locally
Crop, size, optimize and rename all of your photos before you upload them to your WordPress site.
Images can be downloaded from:
- Michigan Engineering Flickr (download the largest available version)
Download headshots for:
- Researchers
- Content creators
- Use Michigan Engineering Portraits Flickr
After downloading, rename the image file on your computer.
Naming convention:
- Most images: [descriptive image keyword].jpg
- Portraits: [lastname]-portrait.jpg
Crop the image (or not)
- Aspect ratio should be 3:2 for all photos except portraits.
- Photos downloaded from flickr will have a 3:2 ratio by default
- Portraits are cropped square (1:1 aspect ratio)
If an image needs to be cropped, use ImageResizer to both crop and optimize.
If no cropping is needed, use Squoosh.app
Image Resizer
- Drag the file into ImageResizer
- Select the “Crop” tab on the left size of the editing panel
- Portraits: Select the 1:1 (Square) option from Aspect Ratio (ignore dimensions at this time)
- All other images: Select 3:2 (35mm film) option from Aspect Ratio (ignore dimensions at this time)
- Adjust the size of the grid by clicking and dragging the corner of the grid to ensure the person is properly centered in the frame!
- Select the Crop button to save this change.
- Navigate back to the “Resize” tab
- Resize width and height
- Portraits: 350 px by 350px
- All other images: Size can vary but width should never be more than 2200px
- Under “Target File Size” type 250kb.
- Select “Resize Image →”button at the bottom
- Download the new image.
Squoosh
- Open the Squoosh app
- Drag photo into Squoosh
- Select Resize toggle
- Adjust width and height
- Portraits: 350 px by 350px
- All other images: Size can vary but width should never be more than 2200px
- Adjust quality bar so the file size is less than 250kb.
- Select the Download button.
Download the image from Squoosh and upload it to your site.
Tips
Compress in MozJPEG format for photos and in OmniPNG format for graphics.
Compression is a judgement call. These steps will help you get the image as small as possible while still preserving quality
- Pull the quality slider way to the left, to 30 % or so. Note how bad the right side of the image looks.
- Gradually work the quality slider back toward the high end until the difference between the left and right side of the image is negligible or nonexistent.
- Pay particular attention to the resolution at the focal point of the image (wherever your eye is drawn)
Upload images to media library.
- When uploading people (headshots) check the media library for their name first to make sure you’re not uploading a duplicate.
- For each image, enter the following :
- Alt text (brief description that puts image in context, see guidance from World Wide Web Consortium). This is possibly the best article I’ve ever seen on alt text
- Description (can be very similar to caption)
- Caption (including photo credit)
- Grab your images and make sure they have meaningful filenames
- If they are not at a 3:2 aspect ratio, crop them so that they are, with a max width of 2200px
- If downloading from C&M’s Flickr
- Aspect ratio will already be 3:2
- Download the size that’s about 2000px wide.
- Use Squoosh to optimize.
- Drag photo into Squoosh
- Compress in MozJPEG format
- Pull the quality slider way to the left, to 30 % or so. Note how bad the right side of the image looks.
- Gradually work the quality slider back toward the high end until the difference between the left and right side of the image is negligible or nonexistent.
- File size should be no more than a couple hundred Kb.
- Download the image from squoosh and upload it to your site.