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_imagesandrewrite_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_profilenginx
pagespeed EnableFilters strip_image_color_profile;IIS (pagespeed.config)
pagespeed EnableFilters strip_image_color_profileIt 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_profileremoves 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_profileis in CoreFilters, the default RewriteLevel, so it runs unless you turn it off withDisableFilters. It is also part of the OptimizeForBandwidth level. - How do I turn off strip_image_color_profile?
- Add
ModPagespeedDisableFilters strip_image_color_profileon Apache orpagespeed DisableFilters strip_image_color_profile;on nginx. On IIS, addpagespeed DisableFilters strip_image_color_profileto pagespeed.config.
Related filters
- jpeg_subsampling — JPEG chroma subsampling
- strip_image_meta_data — Strip image metadata
- convert_gif_to_png — Convert GIF to PNG
- convert_jpeg_to_avif — Convert JPEG to AVIF
- convert_jpeg_to_progressive — Progressive JPEG
- convert_jpeg_to_webp — Convert JPEG to WebP
- convert_png_to_jpeg — Convert PNG to JPEG
- convert_to_avif_animated — Animated AVIF
This page is drawn from the strip_image_color_profile entry on Image filters. Every filter in one table: PageSpeed filters.