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
Change image processing from ImageMagick to libvips #30090
base: main
Are you sure you want to change the base?
Conversation
407560d
to
b2407c3
Compare
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.
The Github actions will need to install libvips42
instead of imagemagick
.
There are probably some ImageMagick related files to remove, for example config/imagemagick
.
The Docker image will also need to be changed to install vips, @vmstan started to work on it. Maybe you can update it in this PR to simply install libvips42
in place of imagemagick
, and @vmstan can open another PR later to get it installed better (because the current Debian package enabled far too many formats for our usage).
We will also need to take great care in the upgrade instructions to tell people that they need to install VIPS now (and uninstall IM?). This will also be an issue with people running on nightly. The alternative is to support both IM and VIPS for 4.3, with a config option to enable VIPS, show a deprecation warning with IM is used, and remove IM support in 4.4, but I do not know if this is worth it.
It is also probably a good idea to call Untrusted operations can be seen with |
4e72551
to
f29cce2
Compare
e40fea5
to
9bd1761
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
Worth adding libheif? |
It's included by the libvips42 package. |
I’ve been running this PR for the last 20 hours on vmst.io and it’s been largely successful. I have had no user reported issues uploading and processing image content, but noticed a few entries in Sidekiq dead queue triggered by a few remote posts.
|
I've run into an issue where uploading a PNG file that exceeds the allowed dimensions/megapixels results in an error of Uploading a file that is exactly 2160x3840 works, but a file that is 2161x3842 will result in the above error. In both cases the file is roughly 4.6 MB in size. So not only is the wrong type of error being triggered, it doesn't seem like any error should be triggered if the file was rescaled by vips. I do not see this issue with JPG or HEIF files. |
@vmstan As a switch to libvips supposedly allows WebP and AVIF files to be rendered in link previews (closing #27370 and #14983, and probably many more) do you see that many of the issues listed here are resolved? |
I test posted all of the links shared in that comment and they looked the same on my instance running with vips as they do on mastodon.online running ImageMagick and similar build of 4.3. |
OK, that's odd. As I've already bug spammed this ticket enough and this is a libvips implementation ticket let's get to the bottom of the issue using ticket #14983 and consider using ticket #27370 as a potential stopgap until the system accepts WebP and AVIF. Once libvips has properly landed I can be more helpful with troubleshooting. |
Fixes MAS-223