Open
Conversation
- Created Image_lib library to handle EXIF stripping for JPEG, PNG, GIF, and WebP images - Uses GD library to re-encode images without EXIF data - Added EXIF stripping to both company logo upload (Config controller) and item image upload (Items controller) - Handles privacy concern by removing geolocation and device info from uploaded images Fixes #4010
- Renamed strip_exif() to stripEXIF() for PSR-12 compliance - Added configuration options for EXIF stripping (exif_stripping_enabled, exif_fields_to_keep) - Migration to add new config keys with sensible defaults - Updated Config and Items controllers to check config before stripping EXIF - Made EXIF stripping optional via settings, defaulting to disabled for backward compatibility - Allows selective field preservation (Copyright, Orientation by default)
- Add fileeye/pel dependency to composer.json for selective EXIF field removal - Rewrite Image_lib::stripExifJpeg() to use FileEye/pel for precise field manipulation - Add exif_to_pel_tags mapping for supported EXIF fields - Implement removeExifFields() to selectively remove EXIF data based on config - Keep fallback method if library is unavailable or parsing fails - Add language strings for new configuration options - Update migration to include Software in default fields to keep This addresses reviewer concern about preserving copyright and other beneficial metadata while removing privacy-sensitive fields like GPS location.
objecttothis
previously approved these changes
Mar 8, 2026
objecttothis
previously approved these changes
Mar 9, 2026
- Add checkbox to enable/disable EXIF stripping - Add multiselect dropdown for EXIF fields to keep (Make, Model, Orientation, Copyright, Software, DateTime, GPS) - Place UI in General Settings after Image Restrictions section - Add JavaScript to enable/disable multiselect based on checkbox state - Follows existing UI patterns (similar to image_allowed_types multiselect) - Integrates with existing backend migration and Image_lib implementation Closes #4405 - EXIF stripping improvements
objecttothis
approved these changes
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses all review comments from #4394:
✅ Completed Changes
PSR-12 Compliance: Renamed
strip_exif()tostripEXIF()(app/Libraries/Image_lib.php:7)Configuration Options: Added two new configuration keys:
exif_stripping_enabled: Toggle to enable/disable EXIF stripping (defaults to '0' for backward compatibility)exif_fields_to_keep: Comma-separated list of EXIF fields to preserve (defaults to 'Copyright,Orientation')Conditional Stripping: Updated Config and Items controllers to only strip EXIF when enabled:
Migration: Created migration to add new config keys to existing installations
📝 Design Decisions
Following the reviewer's "Good, Better, Best" framework:
🔒 Security Benefits
🔧 Testing
Closes #4394 review comments