-
Notifications
You must be signed in to change notification settings - Fork 50
fix: add image processor disabled flag with alternate processor #1723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a feature flag disableImageProcessor to disable the main image processor and provide a fallback implementation using the Canvas API. This allows the application to continue processing avatar images even when the main image processor is disabled or unavailable.
- Added
disableImageProcessorfeature flag with environment variable support - Implemented Canvas-based fallback image processor for avatar processing
- Added error handling to catch image processor failures and use the fallback
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
ts/state/ducks/types/releasedFeaturesReduxTypes.ts |
Added disableImageProcessor boolean feature flag to the type definition |
ts/state/ducks/types/defaultFeatureFlags.ts |
Configured default value for disableImageProcessor based on environment variable SESSION_DISABLE_IMAGE_PROCESSOR |
ts/webworker/workers/browser/image_processor_interface.ts |
Added feature flag check to throw error when image processor is disabled |
ts/util/avatar/processAvatarData.ts |
Implemented processImageFallback using Canvas API and added try-catch to fall back when main processor fails |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
47a5455 to
6c23e43
Compare
2dd7e57 to
12ad9d4
Compare
SESSION_DISABLE_IMAGE_PROCESSOR=1environment variable to disable the use of the image processor. Generated link preview images will no longer work and display pictures are limited to non-animated images.