filter · Image filters
Strip image metadata (strip_image_meta_data)
- Category:
- Image
- CoreFilters:
- Yes
- OptimizeForBandwidth:
- Yes
- Risk:
- Generally safe
strip_image_meta_data removes EXIF, XMP, and other metadata from images. This includes camera information, GPS coordinates, thumbnails, and editing history.
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_meta_datanginx
pagespeed EnableFilters strip_image_meta_data;IIS (pagespeed.config)
pagespeed EnableFilters strip_image_meta_dataIt is on by default under CoreFilters; to turn it off:
ModPagespeedDisableFilters strip_image_meta_data # Apache
pagespeed DisableFilters strip_image_meta_data; # nginx
pagespeed DisableFilters strip_image_meta_data # IISOn the worker
The worker runs its own pipeline, configured by flags. Its equivalent of this filter
is the
image pipeline
transform. Always-on baseline under pagespeed on;; there is no per-transform off switch.
Scoping, ForbidFilters and the thresholds filters read:
Choosing filters
.
Frequently asked questions
- What does the strip_image_meta_data filter do?
strip_image_meta_dataremoves EXIF, XMP, and other metadata from images. This includes camera information, GPS coordinates, thumbnails, and editing history.- Is strip_image_meta_data enabled by default?
- Yes.
strip_image_meta_datais 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_meta_data?
- Add
ModPagespeedDisableFilters strip_image_meta_dataon Apache orpagespeed DisableFilters strip_image_meta_data;on nginx. On IIS, addpagespeed DisableFilters strip_image_meta_datato pagespeed.config.
Related filters
- jpeg_subsampling — JPEG chroma subsampling
- strip_image_color_profile — Strip image color profiles
- 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_meta_data entry on Image filters. Every filter in one table: PageSpeed filters.