-
Couldn't load subscription status.
- Fork 8
feat: add support for webp in imagick #50
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe Dockerfile was changed to add the libwebp package to the APK runtime dependencies in the final image. tests.yaml was updated: the PHP test was renamed from "PHP info" to "PHP modules" and continues to validate PHP modules with Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Dockerfile (1)
31-32: Consider adding libwebp-dev to the compile stage for consistency and completeness.The
libwebppackage is correctly added to the final stage (line 197), butlibwebp-devis missing from the compile stage whereimagemagick-devis installed. For consistency with other image format development libraries (e.g.,libjpeg-turbo-devat line 33,libpng-devat line 35,libjxl-devat line 36), consider addinglibwebp-devto the compile stage as well.This ensures that if
imagemagick-devneeds to detect or support WebP formats during the compilation phase, the necessary development headers are available.Apply this diff to add libwebp-dev to the compile stage:
RUN apk update && apk upgrade && apk add --no-cache --virtual .deps \ linux-headers \ make \ automake \ autoconf \ gcc \ g++ \ git \ zlib-dev \ openssl-dev \ yaml-dev \ imagemagick \ imagemagick-dev \ libjpeg-turbo-dev \ jpeg-dev \ libpng-dev \ libjxl-dev \ + libwebp-dev \ libmaxminddb-dev \ zstd-dev \ brotli-dev \ lz4-dev \ curl-devAlso applies to: 174-210
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Dockerfile(1 hunks)tests.yaml(2 hunks)
🔇 Additional comments (1)
tests.yaml (1)
20-36: Test is correct; clarify where WEBP appears in output.The test change from
php -mtophp -iis appropriate, andWEBPwill be correctly detected. However, WEBP appears in the "ImageMagick supported formats" section ofphp -ioutput, not in the imagick module configuration line. It appears as part of a comma-separated formats list (e.g., "...WMV, WEBP, WPG...") when ImageMagick is compiled with libwebp support.
tests.yaml
Outdated
| - name: 'PHP info' | ||
| command: "php" | ||
| args: ["-m"] | ||
| args: ["-i"] |
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.
I think we should keep this as m, i can show like x support => disabled which will still match
998df1c to
cba2f04
Compare
What does this PR do?
Because libwebp was not installed, imagemagick-dev wasn't installed with webp support. To ensure downstream dependencies to support webp, libwebp must be installed along with imagemagick-dev
Test Plan
Updated tests to check for WEBP as supported format
Related PRs and Issues
Have you read the Contributing Guidelines on issues?
Yes
Summary by CodeRabbit
Chores
Tests