I'm attempting to use this module alongside the s3fs module which stores images using the s3://
file scheme instead of public://
.
This registers correctly as a remote filesystem, which means this module first writes a temporary local file with imagick and then moves it afterwards.
Trouble is, the destination prepends the image format to the file uri, so the temp path eventually becomes JPEG:/tmp/imagick_HASH
. That's totally fine to pass off to imagick, but file_unmanaged_move
is unable to use that to later move the file.
I've written a patch and actually pulled the bit prepending the filetype all-together. From what I can tell, this is a way to tell imagick to ignore the file's type and force saving to a particular type, but this module was grabbing the prepended value by analyzing the file type so it's seemingly redundant unless I'm missing something.
I have a TODO concerning a check being run to validate the file scheme, it looks like that should probably error? I'm not sure that that check should say 'no, invalid, just continue as if you didn't see it' but I'm also not sure the use case there.