Skip to main content
Docs menu

filter · Image filters

Strip image color profiles (strip_image_color_profile)

Category:
Image
CoreFilters:
Yes
OptimizeForBandwidth:
Yes
Risk:
Generally safe

strip_image_color_profile removes embedded ICC color profiles from images. Most web browsers ignore ICC profiles, and they can add tens of kilobytes to a file.

When to use it

  • In CoreFilters, the default RewriteLevel: it runs unless you disable it.
  • Part of OptimizeForBandwidth, the level that optimizes resources without changing their URLs.
  • Also switched on by recompress_images and rewrite_images.
  • Risk rating on these docs: Generally safe.

Risks

  • Stripping color profiles can cause subtle color shifts on wide-gamut displays or for images authored in non-sRGB color spaces. This affects a small fraction of web images.

  • Stripping metadata removes copyright and attribution information embedded in the file. The metadata is removed from the served variant only; original files on disk are not modified.

Configuration

Enable it in the module configuration, at server, virtual-host or location scope:

Apache

ModPagespeedEnableFilters strip_image_color_profile

nginx

pagespeed EnableFilters strip_image_color_profile;

IIS (pagespeed.config)

pagespeed EnableFilters strip_image_color_profile

It is on by default under CoreFilters; to turn it off:

ModPagespeedDisableFilters strip_image_color_profile   # Apache
pagespeed DisableFilters strip_image_color_profile;   # nginx
pagespeed DisableFilters strip_image_color_profile   # IIS

Scoping, ForbidFilters and the thresholds filters read: Choosing filters.

Frequently asked questions

What does the strip_image_color_profile filter do?
strip_image_color_profile removes embedded ICC color profiles from images. Most web browsers ignore ICC profiles, and they can add tens of kilobytes to a file.
Is strip_image_color_profile enabled by default?
Yes. strip_image_color_profile is in CoreFilters, the default RewriteLevel, so it runs unless you turn it off with DisableFilters. It is also part of the OptimizeForBandwidth level.
How do I turn off strip_image_color_profile?
Add ModPagespeedDisableFilters strip_image_color_profile on Apache or pagespeed DisableFilters strip_image_color_profile; on nginx. On IIS, add pagespeed DisableFilters strip_image_color_profile to pagespeed.config.

This page is drawn from the strip_image_color_profile entry on Image filters. Every filter in one table: PageSpeed filters.

Search