refactor(functions/v2/imagemagick): migrate from gm to sharp#4293
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the gm library with sharp for image processing. The changes include updating the blurring logic to use sharp's asynchronous API, introducing a separate temporary path for blurred images, and ensuring all temporary files are cleaned up in a finally block. Additionally, tests were updated to remove the requirement for system-level ImageMagick installation. A potential issue was identified regarding the sharp version compatibility with the Node.js version specified in the engines field of package.json.
|
@angelcaamal can you resolve the linting issue I added with the check for the buckets? Thank you! Overall, this looks like a solid update. I'm wondering whether we can do a streaming version that would simplify the code but we shouldnt' change it here. more details internally, but once you resolve linting I think this is good. |
Description
Fixes Internal: b/503435756
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
npm test(see Testing)npm run lint(see Style)GoogleCloudPlatform/nodejs-docs-samples. Not a fork.