fix(gif preview): enable resource limits#9940
Conversation
WalkthroughThe changes update configuration files to add support for GIF image formats in both input and output MIME type mappings. A new configuration file introduces a resource limit for image processing memory, which is initialized during configuration setup. The initialization script is updated to include this new resource limit configuration. Changes
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/config/storage/outputs.php (1)
11-11: Add GIF to accepted output MIME types
Mapping"gif" => "image/gif"completes the round-trip support for GIFs. Consider updating documentation or.env.exampleto highlight GIF support and the new_APP_IMAGES_RESOURCE_LIMIT_MEMORYvariable.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
composer.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
app/config/storage/inputs.php(1 hunks)app/config/storage/outputs.php(1 hunks)app/config/storage/resource_limits.php(1 hunks)app/init/configs.php(1 hunks)composer.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: Setup & Build Appwrite Image
- GitHub Check: scan
🔇 Additional comments (4)
app/config/storage/resource_limits.php (1)
1-7: Set memory resource limits early
The new config correctly initializes image processing memory limits using an environment variable with a 64 MB fallback. Casting viaintvalensures an integer is passed. Great job integrating this early in the stack.app/init/configs.php (1)
5-5: Load resource limits before other configs
Includingresource_limits.phpviarequire_onceensures memory limits are applied prior to other image-related configurations. Please verify the autoloader is in place before this include to avoid class-not-found errors forUtopia\ImageandUtopia\System.app/config/storage/inputs.php (1)
10-10: Add GIF to accepted input MIME types
Support for GIF inputs is now enabled by mapping"gif" => "image/gif". This aligns with the updated outputs and enables processing of GIF images.composer.json (1)
61-61: Pinutopia-php/imageto development branch
Switching todev-PLA-2950 as 0.8.0lets you leverage the resource-limit feature. Ensure yourcomposer.jsonstability settings permit this alias, and run a dry-run dependency update to confirm it resolves correctly.
✨ Benchmark results
⚡ Benchmark Comparison
|
e79c89c to
8d43e36
Compare
Needs: utopia-php/image#42
Summary by CodeRabbit