Skip to content

Instantly share code, notes, and snippets.

@CharlieHawker
Last active July 19, 2017 14:43
Show Gist options
  • Save CharlieHawker/ec6483fa74593393991b7129bdc18682 to your computer and use it in GitHub Desktop.
Save CharlieHawker/ec6483fa74593393991b7129bdc18682 to your computer and use it in GitHub Desktop.
Mac user guide to saving images for web

Mac Users' Guide to Saving Images for Web

It's generally good practice to ensure images, particularly photography are 'saved for web' before uploading them to a website; some websites do this for you, but if they don't you could be opening yourself up to display and/or security issues with regards to the metadata the images may contain.

Display issues 👓

If you find your image colours are changing when the files are uploaded, it's probably because image has an embedded color profile. Best practice is to ensure your image uses an sRGB color profile, ideally sRGB IEC61966.

Security issues :trollface:

Metadata on images can contain a wide variety of information beyond copyright / colour profile information. It can contain the details of the camera which took the photo, the names of the people in the shot and even the GPS coordinates of where the photo was taken! Removing metadata is therefore a hugely important step in preparing an image for the web.

Preparing images for web using Adobe Photoshop CC

For users with Photoshop, do the following:

  1. Open the image(s) in Photoshop
  2. Go to File > Export > Export As...
  3. Choose your desired export dimensions / quality.
  4. Under the 'Metadata' section in the bottom right, choose 'None'.
  5. Just under this, in the 'Color Space' section, check the box marked 'Convert to sRGB'.
  6. Click 'Export All...'
  7. Have a cocktail 🍸

Preparing the images for web without Adobe Photoshop CC

If you don't have Photoshop, you'll need to do a two-step process, first, you need to convert the image to sRGB, this can be done with Preview, which is on all Mac computers.

Step 1 - Convert to sRGB

  1. Select all the files you want to edit
  2. Right-click on them and choose Open – Preview should be the default software, but if not choose Open with... and select Preview from the list.
  3. On the left-hand side, you'll see a thumbnail list, select all of the images in this list at once.
  4. From the top menu, click Tools > Assign Profile...
  5. From the dropdown choice, choose a profile that begins with sRGB IEC61966, e.g. sRGB IEC61966-2.1.
  6. Click File > Save

Step 2 - Optimise for web

  1. Download ImageOptim, a free Mac tool for optimising images.
  2. Open the tool.
  3. Drag in the file(s) you wish to optimise for web
  4. When the green tick appears next to each image, they're optimised! You can see the % saving made by the optimisation software.
  5. Have a cocktail 🍸
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment