How to Remove Color Profile with ImageMagick Convert?

Removing embedded color profiles from your images is a quick way to reduce file sizes and strip unnecessary metadata before publishing them to the web. By utilizing the powerful open-source command-line tool ImageMagick, you can easily strip these profiles from single images or batch-process entire directories. This guide will walk you through the precise commands needed to clear color profiles safely while ensuring your images remain optimized and widely compatible across all digital platforms.


Understanding the Remove Profile Commands

ImageMagick provides a couple of distinct ways to handle profile removal depending on how much metadata you want to get rid of. The standard tool for this process in modern versions of ImageMagick is magick, though the legacy convert command is still widely supported and functionally identical for these operations.


If your goal is to minimize file size as much as possible for web performance, stripping all metadata and color profiles is the best route.

To strip everything from an image, use the following command structure:

convert input.jpg -strip output.jpg

Note: If you are using ImageMagick v7 or newer, the modern syntax replaces convert with magick: magick input.jpg -strip output.jpg


Method 2: Removing Only the Color Profile

If you need to keep your camera’s EXIF data (like exposure settings, date taken, or GPS coordinates) but want to drop the heavy embedded ICC color profile, you should use the +profile flag instead of -strip.

To remove just the ICC profile, use this command:

convert input.jpg +profile "icc" output.jpg

Alternatively, you can use a wildcard to strip all profiles while leaving other metadata intact:

convert input.jpg +profile "*" output.jpg

Batch Processing Multiple Images

If you have an entire folder of images that need their color profiles removed, doing them one by one is inefficient. You can combine ImageMagick with a simple command-line loop to process them all at once.

On Linux and macOS (Bash):

for img in *.jpg; do
    convert "$img" -strip "stripped_$img"
done

On Windows (Command Prompt):

for %i in (*.jpg) do convert "%i" -strip "stripped_%i"

A Crucial Warning on Color Distortion

Before you strip a color profile, it is important to know what kind of profile is embedded. Digital screens primarily use the standard sRGB color space.

To prevent color distortion on wide-gamut images, you should always convert the image to the sRGB color space before stripping the profile data:

convert input.jpg -colorspace sRGB -strip output.jpg