This repository was archived by the owner on Jan 7, 2026. It is now read-only.
Change imagick configuration to allow pdf processing#225
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the Dockerfile to enable PDF processing with ImageMagick by modifying its policy file and adding necessary dependencies.
- Added an ARG for the ImageMagick policy configuration file.
- Modified the policy file using sed to change PDF processing rights.
- Added ghostscript to support PDF processing.
Comments suppressed due to low confidence (1)
Dockerfile:22
- [nitpick] Consider renaming the variable 'IMAGEMAGIC_CONFIG' to 'IMAGEMAGICK_CONFIG' for clarity and consistency with the official ImageMagick spelling.
ARG IMAGEMAGIC_CONFIG=/etc/ImageMagick-6/policy.xml
Member
Author
|
@mitpjones ping! :) |
d7415
suggested changes
May 12, 2025
Contributor
d7415
left a comment
There was a problem hiding this comment.
Changing the (apparently dumb) default makes sense. I don't know why that would need to be variable though?
| ARG BRANCH=master | ||
|
|
||
| # https://stackoverflow.com/questions/53377176/change-imagemagick-policy-on-a-dockerfile | ||
| ARG IMAGEMAGIC_CONFIG=/etc/ImageMagick-6/policy.xml |
Contributor
There was a problem hiding this comment.
I don't see why we need this?
Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
d7415
approved these changes
May 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to the
Dockerfileto enhance support for handling PDF files with ImageMagick and includes the addition of a new dependency. The key updates involve configuring ImageMagick's policy settings and adding Ghostscript for improved PDF processing.ImageMagick Configuration Updates:
ARG IMAGEMAGIC_CONFIGto specify the path to the ImageMagick policy file (/etc/ImageMagick-6/policy.xml). This allows for dynamic configuration of ImageMagick policies.RUNcommand to modify the ImageMagick policy file, enablingread|writerights for PDF processing. A fallback message is added if the policy file is not found.Dependency Additions:
ghostscriptto the list of installed packages to support PDF-related operations.