Image_lib.php fixes:
- Remove incorrect 'GPS' => PelTag::GPS_OFFSET mapping (GPS handled separately)
- Fix PNG transparency: change imagealphablending to false
- Add animated GIF detection: skip processing for animations
- Add logging in stripExifFallback to show which APP markers are removed
Migration optimization:
- Use get()->getRow() instead of countAllResults() for lighter query
- More efficient existence check before insert
All changes address CodeRabbit technical review comments while maintaining
the simplified multiselect-only UI (no toggle needed).
Major changes:
- Remove exif_stripping_enabled checkbox, use multiselect only
- Feature is enabled when multiselect has selections
- Disabled when multiselect is empty
- Simplifies UI and logic
- Fix PHP implode() null issue
- Coerce null to empty array before implode (Config.php:398,399)
- Apply fix to both exif_fields_to_keep and image_allowed_types
- Fix GPS removal in Image_lib.php
- Remove GPS via ifd0.removeEntry() instead of incorrect setIfd(null)
- GPS INFO IFD POINTER now properly removed from IFD0
- Fix allowed_types array in Image_lib.php
- Remove unsupported 'image/bmp' and 'image/tiff'
- Return false instead of true for unhandled formats
- Add logging for EXIF stripping failures
- Log warnings when stripEXIF returns false
- Helps debugging without blocking uploads
- Fix migration consistency
- Remove exif_stripping_enabled config (no longer needed)
- Remove unused $forge variable
- Make defaults consistent: Copyright,Orientation,Software
- Update language strings
- Remove exif_stripping_enabled translations
- Clarify exif_fields_to_keep tooltip
Addresses all actionable comments from CodeRabbit review
- 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.
- 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)
- 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